SpringBoot - SpringFox Starter 3.0.0 - Невозможно обнаружить функцию маршрутизатора WebFlux
Я использую SpringBoot WebFlux Springfox-starter для проекта.
Проблема в том, что методы RouterFunction не обнаруживаются. Вышеупомянутые методы обнаруживаются без каких-либо проблем, но не работают для 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>
Я разместил весь проект в указанном ниже месте. Пожалуйста, дайте мне знать, если у кого-то здесь отсутствует такая же или дополнительная конфигурация.
https://github.com/chamithchathuka/demowebflux-2
https://github.com/chamithchathuka/demowebflux-2/tree/master