Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-service
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
姚本章
jz-dmp-service
Commits
35851557
Commit
35851557
authored
Dec 19, 2020
by
DESKTOP-5KITOLR\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swagger 提交
parent
283ba663
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
6 deletions
+55
-6
pom.xml
pom.xml
+8
-3
DmpApplication.java
src/main/java/com/jz/DmpApplication.java
+2
-0
SwaggerConfiguration.java
src/main/java/com/jz/dmp/config/SwaggerConfiguration.java
+43
-0
toolsController.java
...n/java/com/jz/dmp/modules/controller/toolsController.java
+2
-3
No files found.
pom.xml
View file @
35851557
...
@@ -87,15 +87,20 @@
...
@@ -87,15 +87,20 @@
</exclusions>
</exclusions>
</dependency>
</dependency>
<!-- swagger -->
<!-- swagger -->
<dependency>
<
!--<
dependency>
<groupId>io.springfox</groupId>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.4.0</version>
<version>2.4.0</version>
</dependency>
</dependency>
-->
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
2.4.0
</version>
<version>
2.9.2
</version>
</dependency>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
swagger-bootstrap-ui
</artifactId>
<version>
1.9.6
</version>
</dependency>
</dependency>
<!--引入JWT依赖,由于是基于Java,所以需要的是java-jwt -->
<!--引入JWT依赖,由于是基于Java,所以需要的是java-jwt -->
<dependency>
<dependency>
...
...
src/main/java/com/jz/DmpApplication.java
View file @
35851557
...
@@ -7,7 +7,9 @@ import org.springframework.boot.actuate.health.Health;
...
@@ -7,7 +7,9 @@ import org.springframework.boot.actuate.health.Health;
import
org.springframework.boot.actuate.health.HealthIndicator
;
import
org.springframework.boot.actuate.health.HealthIndicator
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
@EnableTransactionManagement
@SpringBootApplication
@SpringBootApplication
@EnableCaching
@EnableCaching
public
class
DmpApplication
implements
HealthIndicator
{
public
class
DmpApplication
implements
HealthIndicator
{
...
...
src/main/java/com/jz/dmp/config/SwaggerConfiguration.java
0 → 100644
View file @
35851557
package
com
.
jz
.
dmp
.
config
;
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.dmp.modules.controller"
))
.
paths
(
PathSelectors
.
any
())
.
build
();
}
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"数据中台 APIs"
)
.
description
(
"swagger-bootstrap-ui"
)
.
termsOfServiceUrl
(
"http://localhost:5050/"
)
.
contact
(
"Bellamy"
)
.
version
(
"1.0"
)
.
build
();
}
}
src/main/java/com/jz/dmp/modules/controller/toolsController.java
View file @
35851557
package
com
.
jz
.
dmp
.
modules
.
controller
;
package
com
.
jz
.
dmp
.
modules
.
controller
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.dmp.modules.service.AtomBaseCacheService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
com.jz.common.constant.JsonResult
;
import
com.jz.dmp.modules.service.AtomBaseCacheService
;
/**
/**
* 暂时注释
* 暂时注释
* @author 86186
* @author 86186
...
...
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