Skip to content

Commit

Permalink
2.0.0, 升级到支持spring boot 2.0,整合swagger-bootstrap-ui,提供更好看的UI
Browse files Browse the repository at this point in the history
  • Loading branch information
dyc87112 committed Apr 23, 2019
1 parent 5c94c29 commit a698829
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 20 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Swagger Butler是一个基于Swagger与Zuul构建的API文档汇集工具。通

- 我的博客:http://blog.didispace.com
- 我们社区:http://www.spring4all.com
- 知识星球(深度交流与问答)https://t.xiaomiquan.com/zfEiY3v
- 知识星球:https://t.xiaomiquan.com/zfEiY3v
- Spring Boot基础教程:http://blog.didispace.com/Spring-Boot%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B/
- Spring Cloud基础教程:http://blog.didispace.com/Spring-Cloud%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B/
- 公益调试Eureka:http://eureka.didispace.com
Expand All @@ -32,14 +32,14 @@ Swagger Butler是一个基于Swagger与Zuul构建的API文档汇集工具。通
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
<version>2.0.0.RELEASE</version>
</parent>

<dependencies>
<dependency>
<groupId>com.didispace</groupId>
<artifactId>swagger-butler-core</artifactId>
<version>1.2.0</version>
<version>2.0.0</version>
</dependency>
</dependencies>
```
Expand Down Expand Up @@ -87,9 +87,15 @@ swagger.butler.resources.product.swagger-version=2.0
- `api-docs-path`:要获取的swagger文档的具体路径;如果不配置会使用全局的`swagger.butler.api-docs-path`配置,默认为`/v2/api-docs`。;这里的配置主要用户一些特殊情况,比如服务自身设置了context-path,或者修改了swagger默认的文档路径
- `swagger-version`:swagger版本信息;如果不配置会使用全局的`swagger.butler.swagger-version`配置,默认为`2.0`

**第五步**:访问`http://localhost:11000/swagger-ui.html`
**第五步**:查看聚合文档。

原生文档:访问`http://localhost:11000/swagger-ui.html`

![Example-1](https://github.com/dyc87112/swagger-butler/blob/master/static/example.png?raw=true)

增强文档:访问`http://localhost:11000/doc.html`

![Example](https://github.com/dyc87112/swagger-butler/blob/master/static/example.png?raw=true)
![Example-2](https://github.com/dyc87112/swagger-butler/blob/master/static/example-2.png?raw=true)

> 代码示例具体可见`swagger-butler-example-static`目录
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.didispace</groupId>
<artifactId>swagger-butler</artifactId>
<version>1.1.0</version>
<version>2.0.0</version>
<packaging>pom</packaging>

<name>swagger-butler</name>
Expand Down
Binary file added static/example-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 12 additions & 5 deletions swagger-butler-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.didispace</groupId>
<artifactId>swagger-butler-core</artifactId>
<version>1.2.0</version>
<version>2.0.0</version>
<packaging>jar</packaging>

<name>swagger-butler-core</name>
Expand Down Expand Up @@ -33,7 +33,7 @@

<developers>
<developer>
<name>翟永超-程序猿DD</name>
<name>程序猿DD</name>
<email>[email protected]</email>
<organization>http://didispace.com</organization>
</developer>
Expand All @@ -43,8 +43,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<version.java>1.8</version.java>
<version.swagger>2.9.2</version.swagger>
<version.spring-boot>1.5.10.RELEASE</version.spring-boot>
<version.spring-cloud>Dalston.SR5</version.spring-cloud>
<version.spring-boot>2.0.0.RELEASE</version.spring-boot>
<version.spring-cloud>Finchley.SR1</version.spring-cloud>
</properties>

<dependencies>
Expand All @@ -61,14 +61,21 @@

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zuul</artifactId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${version.swagger}</version>
</dependency>

<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.3</version>
</dependency>

<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions swagger-butler-example-consul/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
<version>2.0.0.RELEASE</version>
</parent>

<dependencies>
<dependency>
<groupId>com.didispace</groupId>
<artifactId>swagger-butler-core</artifactId>
<version>1.1.0</version>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
<version>1.3.2.RELEASE</version>
<version>2.0.1.RELEASE</version>
</dependency>
</dependencies>

Expand Down
8 changes: 4 additions & 4 deletions swagger-butler-example-eureka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
<version>2.0.0.RELEASE</version>
</parent>

<dependencies>
<dependency>
<groupId>com.didispace</groupId>
<artifactId>swagger-butler-core</artifactId>
<version>1.1.0</version>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
<version>1.3.2.RELEASE</version>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions swagger-butler-example-static/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
<version>2.0.0.RELEASE</version>
</parent>

<dependencies>
<dependency>
<groupId>com.didispace</groupId>
<artifactId>swagger-butler-core</artifactId>
<version>1.1.0</version>
<version>2.0.0</version>
</dependency>
</dependencies>

Expand Down

0 comments on commit a698829

Please sign in to comment.