0

I cannot get Swagger UI working with Webflux.

According to countless answers here, you should be able to just add springfox-boot-starter and it should work.

I have created a minimum reproducible example which you can download and run. It is a plain project from Spring Initializr with Webflux and a single testing endpoint on path /hello. Trying to open the swagger UI always returns 404. I have tried the official path /swagger-ui/ as well as all other possible options such as /swagger-ui.html, /swagger-ui/index.html.

Jardo
  • 1,939
  • 2
  • 25
  • 45

1 Answers1

0

For spring-boot 3 support, make sure you use springdoc-openapi v2. This does not requires any kind of configuration as such. Swagger can be accessed using http:localhost:8080/swagger-ui/index.html

Link: SpringDocs

<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
    <version>2.1.0</version>
</dependency>
Nagaraj S Kharvi
  • 73
  • 1
  • 2
  • 12