swagger-spring-boot-starter

swagger spring boot starter

License

License

Categories

Categories

Spring Boot Container Microservices Swagger Program Interface REST Frameworks
GroupId

GroupId

com.github.dingey
ArtifactId

ArtifactId

swagger-spring-boot-starter
Last Version

Last Version

1.2
Release Date

Release Date

Type

Type

jar
Description

Description

swagger-spring-boot-starter
swagger spring boot starter
Project URL

Project URL

https://github.com/dingey/swagger-spring-boot-starter
Source Code Management

Source Code Management

https://github.com/dingey/swagger-spring-boot-starter

Download swagger-spring-boot-starter

How to add to project

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

Dependencies

compile (8)

Group / Artifact Type Version
org.springframework.boot : spring-boot-configuration-processor Optional jar 2.1.4.RELEASE
org.springframework.boot : spring-boot-autoconfigure Optional jar 2.1.4.RELEASE
io.springfox : springfox-swagger2 jar 2.9.2
io.springfox : springfox-swagger-ui jar 2.9.2
org.springframework.cloud : spring-cloud-netflix-zuul Optional jar 2.1.0.RELEASE
javax.servlet : javax.servlet-api Optional jar 4.0.1
org.springframework.cloud : spring-cloud-gateway-core Optional jar 2.1.5.RELEASE
org.springframework : spring-web Optional jar

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok Optional jar 1.18.6

Project Modules

There are no modules declared in this project.

swagger-spring-boot-starter

swagger自动配置,默认引入依赖即可无需配置任何属性。支持zuul网关和spring gateway网关。

<dependency>
    <groupId>com.github.dingey</groupId>
    <artifactId>swagger-spring-boot-starter</artifactId>
    <version>1.1</version>
</dependency>

###配置示例

swagger:
  enable: true #默认启用
  title: 标题 #为null,取spring.application.name值,为空字符则不展示标题
  description: 这是文档说明 #title和description都为空字符,则隐藏页面头元素
  api-keys: #配置鉴权信息
    - name: 鉴权
      keyname: Auth
      pass-as: header # header/cookie
  resources: #网关层可配置聚合各服务的文档地址,未配置取网关的配置
    - name: 文档1
      url: /v2/api-docs
    - name: 文档2
      url: /v2/api-docs2
  ignore-types: #忽略方法指定类型的参数
    - ch.qos.logback.classic.AsyncAppender
    - org.springframework.web.multipart.MultipartFile
spring: #对spring gateway网关的支持
  cloud:
    gateway:
      routes:
        - id:  user
          uri: lb://sample-user
          predicates:
          - Path=/user/**
          filters:
          - StripPrefix=1
zuul: #对对spring zuul网关的支持
  routes:
    user:
      path: /user/**
      serviceId: user-service

Versions

Version
1.2
1.1
1.0