Skip to content

Commit c91ddb2

Browse files
committed
Spring Boot 2.x基础教程:Swagger静态文档的生成
1 parent c4ac2d1 commit c91ddb2

File tree

30 files changed

+4673
-0
lines changed

30 files changed

+4673
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
- [Spring Boot 2.x基础教程:使用Swagger2构建强大的API文档](http://blog.didispace.com/spring-boot-learning-21-2-2/)
6262
- [Spring Boot 2.x基础教程:JSR-303实现请求参数校验](http://blog.didispace.com/spring-boot-learning-21-2-3/)
6363
- [Spring Boot 2.x基础教程:Swagger接口分类与各元素排序问题详解](http://blog.didispace.com/spring-boot-learning-21-2-4/)
64+
- [Spring Boot 2.x基础教程:Swagger静态文档的生成](http://blog.didispace.com/spring-boot-learning-21-2-5/)
6465

6566
连载中...Star关注支持以下,随时获得更新信息!
6667

README_zh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
- [Spring Boot 2.x基础教程:使用Swagger2构建强大的API文档](http://blog.didispace.com/spring-boot-learning-21-2-2/)
5555
- [Spring Boot 2.x基础教程:JSR-303实现请求参数校验](http://blog.didispace.com/spring-boot-learning-21-2-3/)
5656
- [Spring Boot 2.x基础教程:Swagger接口分类与各元素排序问题详解](http://blog.didispace.com/spring-boot-learning-21-2-4/)
57+
- [Spring Boot 2.x基础教程:Swagger静态文档的生成](http://blog.didispace.com/spring-boot-learning-21-2-5/)
5758

5859
连载中...Star关注支持以下,随时获得更新信息!
5960

chapter2-5/.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
HELP.md
2+
/target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
5+
### STS ###
6+
.apt_generated
7+
.classpath
8+
.factorypath
9+
.project
10+
.settings
11+
.springBeans
12+
.sts4-cache
13+
14+
### IntelliJ IDEA ###
15+
.idea
16+
*.iws
17+
*.iml
18+
*.ipr
19+
20+
### NetBeans ###
21+
/nbproject/private/
22+
/nbbuild/
23+
/dist/
24+
/nbdist/
25+
/.nb-gradle/
26+
/build/
27+
28+
### VS Code ###
29+
.vscode/

chapter2-5/pom.xml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<parent>
7+
<groupId>org.springframework.boot</groupId>
8+
<artifactId>spring-boot-starter-parent</artifactId>
9+
<version>2.1.3.RELEASE</version>
10+
<relativePath/> <!-- lookup parent from repository -->
11+
</parent>
12+
13+
<groupId>com.didispace</groupId>
14+
<artifactId>chapter2-5</artifactId>
15+
<version>0.0.1-SNAPSHOT</version>
16+
<name>chapter2-5</name>
17+
<description>Demo project for Spring Boot</description>
18+
19+
<properties>
20+
<java.version>1.8</java.version>
21+
</properties>
22+
23+
<dependencies>
24+
<dependency>
25+
<groupId>org.springframework.boot</groupId>
26+
<artifactId>spring-boot-starter-web</artifactId>
27+
</dependency>
28+
29+
<dependency>
30+
<groupId>com.spring4all</groupId>
31+
<artifactId>swagger-spring-boot-starter</artifactId>
32+
<version>1.9.0.RELEASE</version>
33+
</dependency>
34+
35+
<dependency>
36+
<groupId>org.projectlombok</groupId>
37+
<artifactId>lombok</artifactId>
38+
</dependency>
39+
40+
<dependency>
41+
<groupId>org.springframework.boot</groupId>
42+
<artifactId>spring-boot-starter-test</artifactId>
43+
<scope>test</scope>
44+
</dependency>
45+
46+
<dependency>
47+
<groupId>io.github.swagger2markup</groupId>
48+
<artifactId>swagger2markup</artifactId>
49+
<version>1.3.3</version>
50+
<scope>test</scope>
51+
</dependency>
52+
</dependencies>
53+
54+
<build>
55+
<plugins>
56+
<plugin>
57+
<groupId>org.springframework.boot</groupId>
58+
<artifactId>spring-boot-maven-plugin</artifactId>
59+
</plugin>
60+
61+
<plugin>
62+
<groupId>io.github.swagger2markup</groupId>
63+
<artifactId>swagger2markup-maven-plugin</artifactId>
64+
<version>1.3.3</version>
65+
<configuration>
66+
<swaggerInput>http://localhost:8080/v2/api-docs</swaggerInput>
67+
<outputDir>src/docs/asciidoc/generated-by-plugin</outputDir>
68+
<config>
69+
<swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
70+
</config>
71+
</configuration>
72+
</plugin>
73+
74+
<plugin>
75+
<groupId>org.asciidoctor</groupId>
76+
<artifactId>asciidoctor-maven-plugin</artifactId>
77+
<version>1.5.6</version>
78+
<configuration>
79+
<sourceDirectory>src/docs/asciidoc/generated</sourceDirectory>
80+
<outputDirectory>src/docs/asciidoc/html</outputDirectory>
81+
<backend>html</backend>
82+
<sourceHighlighter>coderay</sourceHighlighter>
83+
<attributes>
84+
<toc>left</toc>
85+
</attributes>
86+
</configuration>
87+
</plugin>
88+
</plugins>
89+
</build>
90+
91+
<repositories>
92+
<repository>
93+
<snapshots>
94+
<enabled>false</enabled>
95+
</snapshots>
96+
<id>jcenter-releases</id>
97+
<name>jcenter</name>
98+
<url>http://jcenter.bintray.com</url>
99+
</repository>
100+
</repositories>
101+
102+
</project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
[[_definitions]]
3+
== Definitions
4+
5+
[[_user]]
6+
=== User
7+
用户实体
8+
9+
10+
[options="header", cols=".^3,.^11,.^4"]
11+
|===
12+
|Name|Description|Schema
13+
|**age** +
14+
__optional__|用户年龄|integer (int32)
15+
|**id** +
16+
__optional__|用户编号|integer (int64)
17+
|**name** +
18+
__optional__|用户姓名|string
19+
|===
20+
21+
22+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
= spring-boot-starter-swagger
2+
3+
4+
[[_overview]]
5+
== Overview
6+
Starter for swagger 2.x
7+
8+
9+
=== Version information
10+
[%hardbreaks]
11+
__Version__ : 1.9.0.RELEASE
12+
13+
14+
=== Contact information
15+
[%hardbreaks]
16+
__Contact__ : didi
17+
__Contact Email__ : [email protected]
18+
19+
20+
=== License information
21+
[%hardbreaks]
22+
__License__ : Apache License, Version 2.0
23+
__License URL__ : https://www.apache.org/licenses/LICENSE-2.0.html
24+
__Terms of service__ : https://github.com/dyc87112/spring-boot-starter-swagger
25+
26+
27+
=== URI scheme
28+
[%hardbreaks]
29+
__Host__ : localhost:8080
30+
__BasePath__ : /
31+
32+
33+
=== Tags
34+
35+
* 用户管理 : User Controller
36+
37+
38+

0 commit comments

Comments
 (0)