0

I am using SpringBoot WebFlux Springfox-starter for the project.

The issue is this not detecting the RouterFunction methods. The above methods are detecting without any issues but it is not working for RouterFunctions.

@Bean
  public RouterFunction<ServerResponse> route(GreetingHandler greetingHandler) {
    return RouterFunctions
        .route(RequestPredicates.GET("/hello")
                .and(RequestPredicates.accept(MediaType.TEXT_PLAIN)),
            greetingHandler::hello);
  }

  @Component
  public static class GreetingHandler {

    public Mono<ServerResponse> hello(ServerRequest request) {
      return ServerResponse.ok()
          .contentType(MediaType.TEXT_PLAIN)
          .body(BodyInserters.fromValue("Hello, SpringFox!"));
    }
  }

https://github.com/springfox/springfox

<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-boot-starter</artifactId>
    <version>3.0.0</version>
</dependency>

I have hosted the entire project in the below location. Please let me know if anyone experience the same or additional configuration missing here.

https://github.com/chamithchathuka/demowebflux-2

enter image description herehttps://github.com/chamithchathuka/demowebflux-2/tree/master

Chamith Chathuka
  • 605
  • 1
  • 6
  • 18

0 Answers0