Tested with Java 17 and SpringBoot 2.7.6
Add the dependency SpringDoc OpenAPI UI:
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.13</version>
</dependency>
https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui
Add the following property in application.properties file
This is optional but could avoid few future problems
spring.mvc.pathmatch.matching-strategy=ant-path-matcher
Check Swagger UI website Run your application and access the following url:
host:port/swagger-ui/index.html
http://localhost:8080/swagger-ui/index.html