By default, you just need to add the dependency of the springdoc-openapi-webflux-ui.
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webflux-ui</artifactId>
<version>1.2.32</version>
</dependency>
You can have a look at the demos code:
You can check you classpath, and try to run the application from outside the IDE.
Make sure you have the correct settings of your IDE depending on your build Tools:
Also, please check if you are using @EnableWebFlux.
As stated in the Spring Boot reference documentation, when you use @EnableWebFlux, you tell Spring Boot that you wish to take full control over the WebFlux configuration and disable all auto-configuration for this (including static resources):
You have two solutions:
- Remove @EnableWebFlux
- If you really want take control of Bean creation and you want absolutely to use @EnableWebFlux, then you need to add an implementation of WebFluxConfigurer.
This has been discussed here:
Best Answer
I have asked the same question on
Github
site regarding the same. Link is provided belowhttps://github.com/springdoc/springdoc-openapi/issues/742#issue-642810354
Got the reply from one of the contributor
springdoc-openapi uses an internal redirect to resolve the necessary swagger resources. This the way the library is built.
You use you own version of swagger-ui, so you can add your custom Logic, without having to rely on springdoc-openapi-ui.