参考:https://springdoc.org/
引入:
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.5.0</version>
</dependency>
配置文件:
springdoc.api-docs.enabled=true
springdoc.api-docs.path=/api-docs
springdoc.swagger-ui.enabled=true
# swagger-ui custom path
springdoc.swagger-ui.path=/swagger-ui.html