Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
commons
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DevOps
commons
Commits
874cd28d
Commit
874cd28d
authored
May 09, 2018
by
xiaoguang.xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: add Readme.md, 基础依赖升级为parent依赖
parent
77bd7035
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
60 deletions
+41
-60
README.md
README.md
+22
-0
pom.xml
brave-spring-boot-starter/pom.xml
+1
-34
pom.xml
commons-spring/pom.xml
+1
-13
pom.xml
pom.xml
+15
-3
pom.xml
shutdown-spring-boot-starter/pom.xml
+0
-8
DefaultSignalHandler.java
...ava/cn/quantgroup/tech/shutdown/DefaultSignalHandler.java
+2
-2
No files found.
README.md
0 → 100644
View file @
874cd28d
commons 简介
=====================
该项目主要利用 Spring Boot 的自动化配置特性.
集成了.
平滑退出/调用链追踪/唯一ID生成器/读写分离/健康检查/
Apollo 配置中心等功能
#基础依赖介绍
spring-boot-starter-parent 1.5.8
lombok 1.6.20
guava 23.0
#如何使用
[
使用说明见Confluence
](
http://confluence.quantgroup.cn/pages/viewpage.action?pageId=5458608
)
#贡献者
[
@张恒
](
heng.zhang@quantgroup.cn
)
[
@刘志国
](
zhiguo.liu@quantgroup.cn
)
[
@朱劲松
](
jinsong.liu@quantgroup.cn
)
brave-spring-boot-starter/pom.xml
View file @
874cd28d
...
...
@@ -13,28 +13,15 @@
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<spring.version>
4.3.8.RELEASE
</spring.version>
<brave.version>
4.19.1
</brave.version>
<zipkin-reporter2.version>
2.5.0
</zipkin-reporter2.version>
<log4j.version>
2.8.2
</log4j.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-autoconfigure
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
...
...
@@ -55,25 +42,6 @@
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-web
</artifactId>
<version>
${spring.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-webmvc
</artifactId>
<version>
${spring.version}
</version>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
<version>
3.1.0
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
io.zipkin.brave
</groupId>
<artifactId>
brave
</artifactId>
...
...
@@ -119,7 +87,6 @@
<artifactId>
brave-instrumentation-spring-rabbit
</artifactId>
<version>
${brave.version}
</version>
</dependency>
<dependency>
<groupId>
io.zipkin.brave
</groupId>
<artifactId>
brave-context-slf4j
</artifactId>
...
...
commons-spring/pom.xml
View file @
874cd28d
...
...
@@ -34,10 +34,8 @@
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<
scope>
compile
</scope
>
<
optional>
true
</optional
>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
...
...
@@ -48,11 +46,6 @@
<artifactId>
spring-boot-starter-data-redis
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
...
...
@@ -79,11 +72,6 @@
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.google.guava
</groupId>
<artifactId>
guava
</artifactId>
<version>
${guava.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
...
...
pom.xml
View file @
874cd28d
...
...
@@ -24,13 +24,14 @@
<packaging>
pom
</packaging>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<maven.test.skip>
true
</maven.test.skip>
<java.version>
1.8
</java.version>
<lombok.version>
1.16.20
</lombok.version>
<guava.version>
23.0
</guava.version>
<apollo.client.version>
0.10.2
</apollo.client.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<maven.test.skip>
true
</maven.test.skip>
<common.parent.version>
0.2.0
</common.parent.version>
</properties>
...
...
@@ -47,6 +48,17 @@
<artifactId>
lombok
</artifactId>
<version>
${lombok.version}
</version>
</dependency>
<!--commons 项目需要自动配置-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
</dependency>
<!--所有项目都有guava-->
<dependency>
<groupId>
com.google.guava
</groupId>
<artifactId>
guava
</artifactId>
<version>
${guava.version}
</version>
</dependency>
</dependencies>
<dependencyManagement>
...
...
shutdown-spring-boot-starter/pom.xml
View file @
874cd28d
...
...
@@ -12,18 +12,10 @@
<artifactId>
shutdown-spring-boot-starter
</artifactId>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-autoconfigure
</artifactId>
</dependency>
<!--以下为可选的-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
shutdown-spring-boot-starter/src/main/java/cn/quantgroup/tech/shutdown/DefaultSignalHandler.java
View file @
874cd28d
...
...
@@ -33,9 +33,9 @@ public class DefaultSignalHandler implements SignalHandler {
shutdownBeanName
=
shutdownBeanNames
[
0
];
//如果不是web应用. 这里会找不到shutdown bean
context
.
getBean
(
shutdownBeanName
,
Shutdown
.
class
).
shutdown
(
bean
.
getTimeout
());
log
.
info
(
"
web 容器 停止接收请求"
);
log
.
info
(
"
{} 停止接收请求"
,
shutdownBeanName
);
}
catch
(
Exception
e
)
{
log
.
info
(
"
Web 容器 shutdown 失败, 检测到你的容器是: {}
"
,
shutdownBeanName
);
log
.
info
(
"
{} shutdown 失败
"
,
shutdownBeanName
);
}
log
.
info
(
"{} 即将执行 @PreDestroy 方法"
,
applicationName
);
System
.
exit
(
0
);
...
...
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