6.使用swagger在线生成接口文档

2019-03-24  本文已影响0人  王杰磊

使用方法

 <dependency>
            <groupId>com.spring4all</groupId>
            <artifactId>swagger-spring-boot-starter</artifactId>
            <version>1.8.0.RELEASE</version>
        </dependency>
@EnableSwagger2Doc
#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/**
上一篇 下一篇

猜你喜欢

热点阅读