Prev Next

Spring / Spring Webflux Interview questions

What are router functions?

RouterFunction is a functional alternative to the @RequestMapping and @Controller annotation style used in standard Spring MVC.

We can use it to route requests to the handler functions.

1
2
3
4
5@Bean
public RouterFunction<ServerResponse> listEmployees(EmployeeService es) {
    return route().GET("/employee", req -> ok().body(es.findAll()))
      .build();
}

More Related questions...

Show more question and Answers...


Comments & Discussions