My springboot webflux application was working and I was able to access swagger ui on url:
http://localhost:8080/webjars/swagger-ui/index.html.
Note: For me Tomcat initialized with port(s): 8080 (http)
POM contains the below dependency
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-webflux-ui</artifactId>
<version>1.6.13</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
My main java class is as below
@OpenAPIDefinition(info = @Info(title = "APIs", version = "1.0", description = "Documentation OHM APIs v1.0"))
public class ReactiveApplication {
public static void main(String[] args) {
SpringApplication.run(ReactiveApplication.class, args);
}
}
All of a sudden I am not able to access webflux swagger anymore on the same url which was working earlier.
Getting below error:
2023-01-05 13:49:36,906 WARN [http-nio-8080-exec-9] o.s.web.servlet.PageNotFound.noHandlerFound: No mapping for GET /webjars/swagger-ui/index.html
2023-01-05 13:49:36,907 WARN [http-nio-8080-exec-9] o.s.web.servlet.PageNotFound.handleNoHandlerFoundException: No handler found for GET /webjars/swagger-ui/index.html
2023-01-05 13:49:36,907 WARN [http-nio-8080-exec-9] o.s.w.s.m.s.DefaultHandlerExceptionResolver.logException: Resolved [org.springframework.web.servlet.NoHandlerFoundException: No handler found for GET /webjars/swagger-ui/index.html]
Can anyone help me understand what to do now. By default on which path webflux swagger can be accessed?
I also tried the below url to access swagger but it did not worked.
http://localhost:8080/swagger-ui.html
http://localhost:8080/swagger-ui