Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
dm_project
Commits
59d95b58
Commit
59d95b58
authored
Nov 26, 2020
by
DESKTOP-5KITOLR\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
dde5c0eb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
1 deletion
+54
-1
pom.xml
jz-dm-mall/pom.xml
+10
-0
SwaggerConfiguration.java
...jz/dm/mall/config/swaggerConfig/SwaggerConfiguration.java
+43
-0
SwaggerConfiguration.java
.../jz/manage/config/swaggerConfig/SwaggerConfiguration.java
+1
-1
No files found.
jz-dm-mall/pom.xml
View file @
59d95b58
...
...
@@ -109,6 +109,16 @@
<artifactId>
lombok
</artifactId>
</dependency>
<!-- swagger2接口文档 -->
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
</dependency>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
swagger-bootstrap-ui
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
jz-dm-mall/src/main/java/com/jz/dm/mall/config/swaggerConfig/SwaggerConfiguration.java
0 → 100644
View file @
59d95b58
package
com
.
jz
.
manage
.
config
.
swaggerConfig
;
import
com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
/**
* @ClassName: SwaggerConfiguration
* @Author Bellamy
* @Date 2020/11/26
*/
@Configuration
@EnableSwagger2
@EnableSwaggerBootstrapUI
public
class
SwaggerConfiguration
{
@Bean
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
apiInfo
(
apiInfo
())
.
select
()
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"com.jz.manage.admin.controller"
))
.
paths
(
PathSelectors
.
any
())
.
build
();
}
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"数据商城 RESTful APIs"
)
.
description
(
"swagger-bootstrap-ui"
)
.
termsOfServiceUrl
(
"http://localhost:5050/"
)
.
contact
(
"Bellamy"
)
.
version
(
"1.0"
)
.
build
();
}
}
jz-dm-manage/src/main/java/com/jz/manage/config/swaggerConfig/SwaggerConfiguration.java
View file @
59d95b58
...
...
@@ -33,7 +33,7 @@ public class SwaggerConfiguration {
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"数据商城 RESTful APIs"
)
.
title
(
"数据商城
平台
RESTful APIs"
)
.
description
(
"swagger-bootstrap-ui"
)
.
termsOfServiceUrl
(
"http://localhost:5050/"
)
.
contact
(
"Bellamy"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment