Added @Router and @Handler to reference routers and handlers in functional endpoints.
Description
In general, annotation-based controller allows you to refer to controllers with unique annotations such as @Controller, while functional endpoint refers to routers and handlers with the traditional @Configuration and @Component annotations. I felt there was a need for annotations to uniquely refer to routers and handlers more explicitly(
Whether used simply for writing explicit code or for AOP), so I posted this PR.
Example
@Router
class TestRouter {
@Bean
fun testRoutes(handler: TestHandler): RouterFunction<ServerResponse> =
router {
...
}
}
Summary
Added
@Router
and@Handler
to reference routers and handlers in functional endpoints.Description
In general, annotation-based controller allows you to refer to controllers with unique annotations such as
@Controller
, while functional endpoint refers to routers and handlers with the traditional@Configuration
and@Component
annotations. I felt there was a need for annotations to uniquely refer to routers and handlers more explicitly( Whether used simply for writing explicit code or for AOP), so I posted this PR.Example