application.properties:
springdoc.swagger-ui.path=/swagger-ui.html
pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.5.0</version>
</dependency>
@RestController also put on the controller classes.
I can get http://localhost:8080/v3/api-docs normally,
but http://localhost:8080/swagger-ui.html get 404
the same situation as http://localhost:8080/swagger-ui/index.html
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sat Dec 07 23:12:25 CST 2024
There was an unexpected error (type=Not Found, status=404).