Controller

When dealing with a lot of routes you most likely want to structure those and split them up into logical units. A controller is such a logical unit that mediates between http calls and your business logic. HTTP-Server doesn't come with any class that you need to extend but we highly recommend to create your own one. It allows you to have common logic that can be called from any controller. It does come with a feature called annotated controllers though which allows you to configure your route mapping by annotating your controller classes and route methods.

None by JavaWebStack Maintainers, 2024 - 2025. All Rights Reserved. Built with Typemill.