Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
DataSwitchSys
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
912协同工作系统
数据交换平台
DataSwitchSys
Commits
eb3072e9
提交
eb3072e9
authored
2月 26, 2020
作者:
LJJ
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加swagger、配置统一启动项
上级
162a312c
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
278 行增加
和
5 行删除
+278
-5
pom.xml
ds-cataloging/pom.xml
+1
-1
pom.xml
ds-misc/pom.xml
+51
-1
MiscApplcaiton.java
ds-misc/src/main/java/com/zjty/ds/misc/MiscApplcaiton.java
+13
-0
AutoDocument.java
...c/src/main/java/com/zjty/ds/misc/config/AutoDocument.java
+23
-0
Swagger2Config.java
...src/main/java/com/zjty/ds/misc/config/Swagger2Config.java
+55
-0
.gitignore
ds-misc/src/main/java/com/zjty/ds/misc/untils/.gitignore
+65
-0
pom.xml
ds-switch/pom.xml
+1
-1
pom.xml
ds-union/pom.xml
+48
-1
UnionApplication.java
...ion/src/main/java/com/zjty/ds/union/UnionApplication.java
+20
-0
pom.xml
pom.xml
+1
-1
没有找到文件。
ds-cataloging/pom.xml
浏览文件 @
eb3072e9
...
...
@@ -4,7 +4,7 @@
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
ds
</artifactId>
<groupId>
com.zjty
</groupId>
<groupId>
com.zjty
.ds
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
ds-misc/pom.xml
浏览文件 @
eb3072e9
...
...
@@ -4,7 +4,7 @@
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
ds
</artifactId>
<groupId>
com.zjty
</groupId>
<groupId>
com.zjty
.ds
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
@@ -12,4 +12,53 @@
<artifactId>
ds-misc
</artifactId>
<properties>
<swagger.version>
2.9.0
</swagger.version>
<java.version>
1.8
</java.version>
</properties>
<dependencies>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
<dependency>
<groupId>
com.github.caspar-chen
</groupId>
<artifactId>
swagger-ui-layer
</artifactId>
<version>
0.0.4
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-bean-validators
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
<dependency>
<groupId>
io.github.swagger2markup
</groupId>
<artifactId>
swagger2markup
</artifactId>
<version>
1.3.1
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
ds-misc/src/main/java/com/zjty/ds/misc/MiscApplcaiton.java
0 → 100644
浏览文件 @
eb3072e9
package
com
.
zjty
.
ds
.
misc
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
/**
* @author LJJ cnljj1995@gmail.com
* on 2020-02-26
*/
@SpringBootApplication
@EnableSwagger2
public
class
MiscApplcaiton
{
}
ds-misc/src/main/java/com/zjty/ds/misc/config/AutoDocument.java
0 → 100644
浏览文件 @
eb3072e9
package
com
.
zjty
.
ds
.
misc
.
config
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.Target
;
import
static
java
.
lang
.
annotation
.
ElementType
.
ANNOTATION_TYPE
;
import
static
java
.
lang
.
annotation
.
ElementType
.
TYPE
;
import
static
java
.
lang
.
annotation
.
RetentionPolicy
.
RUNTIME
;
/**
* fusion-platform. swagger2 autoDocument interface for {@link Swagger2Config}
*
* @author : Matrix [xhyrzldf@gmail.com]
* 19-1-10 .
*/
@Target
({
TYPE
,
ANNOTATION_TYPE
})
@Retention
(
RUNTIME
)
@Documented
public
@interface
AutoDocument
{
String
value
()
default
""
;
}
ds-misc/src/main/java/com/zjty/ds/misc/config/Swagger2Config.java
0 → 100644
浏览文件 @
eb3072e9
package
com
.
zjty
.
ds
.
misc
.
config
;
import
com.google.common.collect.Sets
;
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.service.Contact
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
/**
* fusion-platform.
*
* @author : Matrix [xhyrzldf@gmail.com]
* 19-1-10 .
*/
@Configuration
@EnableSwagger2
public
class
Swagger2Config
{
@Bean
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
produces
(
Sets
.
newHashSet
(
"application/json"
))
.
consumes
(
Sets
.
newHashSet
(
"application/json"
))
.
protocols
(
Sets
.
newHashSet
(
"http"
))
.
apiInfo
(
apiInfo
())
.
forCodeGeneration
(
true
)
.
useDefaultResponseMessages
(
true
)
// .globalResponseMessage(RequestMethod.GET, getResMsg())
.
select
()
// 指定controller存放的目录路径
.
apis
(
RequestHandlerSelectors
.
withClassAnnotation
(
AutoDocument
.
class
))
.
paths
(
PathSelectors
.
any
())
.
build
();
// .apiInfo(apiInfo())
// .securitySchemes(Collections.singletonList(securityScheme()))
// .securityContexts(Collections.singletonList(securityContext()));
}
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
// 文档标题
.
title
(
"XXX项目的API对接文档"
)
// 文档描述
.
description
(
"XXX项目的接口文档与测试页面"
)
.
termsOfServiceUrl
(
"http://192.168.1.1:8080/ty-note/ty-note-blackend.git"
)
.
version
(
"v 0.1.0"
)
.
contact
(
new
Contact
(
"xxx"
,
"http://localhost:8080/xxx"
,
"ty@example.com"
))
.
build
();
}
}
ds-misc/src/main/java/com/zjty/ds/misc/untils/.gitignore
0 → 100644
浏览文件 @
eb3072e9
# dir files
/target/
/log/*
/file
/files
# Compiled class file
*.class
# Log file
*.log
.log
**/.log
# publisher file
schemes.json
# BlueJ files
*.ctxt
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# other files
!.mvn/wrapper/maven-wrapper.jar
*#
*.iml
*.ipr
*.iws
*.jar
*.sw?
*~
.#*
.*.md.html
.DS_Store
.classpath
.factorypath
.gradle
.idea
.metadata
.project
.recommenders
.settings
.springBeans
/build
/code
MANIFEST.MF
_site/
activemq-data
bin
build
build.log
dependency-reduced-pom.xml
dump.rdb
interpolated*.xml
lib/
manifest.yml
overridedb.*
settings.xml
target
transaction-logs
.flattened-pom.xml
secrets.yml
.gradletasknamecache
.sts4-cache
\ No newline at end of file
ds-switch/pom.xml
浏览文件 @
eb3072e9
...
...
@@ -4,7 +4,7 @@
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
ds
</artifactId>
<groupId>
com.zjty
</groupId>
<groupId>
com.zjty
.ds
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
...
...
ds-union/pom.xml
浏览文件 @
eb3072e9
...
...
@@ -4,12 +4,58 @@
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
ds
</artifactId>
<groupId>
com.zjty
</groupId>
<groupId>
com.zjty
.ds
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
ds-union
</artifactId>
<dependencies>
<dependency>
<groupId>
com.zjty.ds
</groupId>
<artifactId>
ds-misc
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-jpa
</artifactId>
</dependency>
<dependency>
<groupId>
com.h2database
</groupId>
<artifactId>
h2
</artifactId>
<scope>
runtime
</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!--打包插件-->
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<executable>
true
</executable>
</configuration>
</plugin>
<!--跳过测试插件-->
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
2.20
</version>
<configuration>
<skipTests>
true
</skipTests>
<!--默认关掉单元测试 -->
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
ds-union/src/main/java/com/zjty/ds/union/UnionApplication.java
0 → 100644
浏览文件 @
eb3072e9
package
com
.
zjty
.
ds
.
union
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
/**
* 项目启动类
*
* @author LJJ cnljj1995@gmail.com
* on 2020-02-26
*/
@SpringBootApplication
(
scanBasePackages
=
{
"com.zjty.ds.misc"
,
"com.zjty.ds.union"
})
public
class
UnionApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
UnionApplication
.
class
,
args
);
}
}
pom.xml
浏览文件 @
eb3072e9
...
...
@@ -18,7 +18,7 @@
</parent>
<groupId>
com.zjty
</groupId>
<groupId>
com.zjty
.ds
</groupId>
<artifactId>
ds
</artifactId>
<packaging>
pom
</packaging>
<version>
1.0-SNAPSHOT
</version>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论