使用方法
<dependency>
<groupId>com.spring4all</groupId>
<artifactId>swagger-spring-boot-starter</artifactId>
<version>1.8.0.RELEASE</version>
</dependency>
@EnableSwagger2Doc
- 在application.properties文件中配置参数
#swagger配置
swagger.enabled=true
swagger.title=spring-boot-mybatis module api
swagger.description=Starter for swagger 2.x
swagger.license=Apache License, Version 2.0
swagger.licenseUrl=https://www.apache.org/licenses/LICENSE-2.0.html
swagger.termsOfServiceUrl=https://github.com/dyc87112/spring-boot-starter-swagger
swagger.contact.name=wjl
swagger.contact.url=https://www.jianshu.com/u/a32873d23481
swagger.contact.email=1433686098@qq.com
swagger.base-package=com.spring.mybatis.springbootdemo.controller
swagger.base-path=/**
swagger.exclude-path=/error, /ops/**