wangcaitao-starter-swagger

restful api doc

License

License

Categories

Categories

Swagger Program Interface REST Frameworks
GroupId

GroupId

cn.wangcaitao
ArtifactId

ArtifactId

wangcaitao-starter-swagger
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

wangcaitao-starter-swagger
restful api doc
Project URL

Project URL

https://github.com/wangcaitao/wangcaitao-starter-swagger
Source Code Management

Source Code Management

https://github.com/wangcaitao/wangcaitao-starter-swagger

Download wangcaitao-starter-swagger

How to add to project

<!-- https://jarcasting.com/artifacts/cn.wangcaitao/wangcaitao-starter-swagger/ -->
<dependency>
    <groupId>cn.wangcaitao</groupId>
    <artifactId>wangcaitao-starter-swagger</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/cn.wangcaitao/wangcaitao-starter-swagger/
implementation 'cn.wangcaitao:wangcaitao-starter-swagger:2.0.0'
// https://jarcasting.com/artifacts/cn.wangcaitao/wangcaitao-starter-swagger/
implementation ("cn.wangcaitao:wangcaitao-starter-swagger:2.0.0")
'cn.wangcaitao:wangcaitao-starter-swagger:jar:2.0.0'
<dependency org="cn.wangcaitao" name="wangcaitao-starter-swagger" rev="2.0.0">
  <artifact name="wangcaitao-starter-swagger" type="jar" />
</dependency>
@Grapes(
@Grab(group='cn.wangcaitao', module='wangcaitao-starter-swagger', version='2.0.0')
)
libraryDependencies += "cn.wangcaitao" % "wangcaitao-starter-swagger" % "2.0.0"
[cn.wangcaitao/wangcaitao-starter-swagger "2.0.0"]

Dependencies

compile (5)

Group / Artifact Type Version
org.springframework.boot : spring-boot-autoconfigure jar 2.0.6.RELEASE
org.springframework.boot : spring-boot-configuration-processor jar 2.0.6.RELEASE
io.springfox : springfox-swagger2 jar
io.springfox : springfox-swagger-ui jar
org.springframework : spring-webmvc jar

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.16.22

Project Modules

There are no modules declared in this project.

wangcaitao-starter-swagger

使用说明

  • pom.xml 添加 maven 依赖
    <dependency>
        <groupId>cn.wangcaitao</groupId>
        <artifactId>wangcaitao-starter-swagger</artifactId>
        <version>${last.version}</version>
    </dependency>
  • application.yml 中添加配置信息
    swagger:
      enable:
      title:
      description:
      base-package:
      contact:
        name:
        email:
        url:
     version:
     resources:
       - {name: "", location: ""}
  • 访问路径
    GET /swagger-ui.html

参数说明

参数 说明 示例值
swagger.enable 是否启用 true
swagger.title 标题 restful apis
swagger.description 描述 restful apis description
swagger.base-package 扫描包 cn.wangcaitao.controller
swagger.contact.name 作者 wangcaitao
swagger.contact.email 邮箱 [email protected]
swagger.contact.url 地址 www.wangcaitao.cn
swagger.version 版本 1.0.0
swagger.resources.name 列表标题 第一行
swagger.resources.location 资源路径 /v2/api-docs

Versions

Version
2.0.0