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
3b3deea6
Commit
3b3deea6
authored
May 08, 2018
by
xiaoguang.xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 升级版本号0.2.0 , 2. 修正signal shutdown 非web应用找不到shutdown bean问题.
parent
0ab5b812
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
29 deletions
+25
-29
pom.xml
brave-spring-boot-starter/pom.xml
+1
-8
pom.xml
commons-core/pom.xml
+1
-1
pom.xml
commons-spring/pom.xml
+1
-7
pom.xml
pom.xml
+12
-5
pom.xml
shutdown-spring-boot-starter/pom.xml
+7
-6
DefaultSignalHandler.java
...ava/cn/quantgroup/tech/shutdown/DefaultSignalHandler.java
+3
-1
GracefulShutdownAutoConfiguration.java
...down/configuration/GracefulShutdownAutoConfiguration.java
+0
-1
No files found.
brave-spring-boot-starter/pom.xml
View file @
3b3deea6
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
commons-parent
</artifactId>
<artifactId>
commons-parent
</artifactId>
<groupId>
cn.quantgroup
</groupId>
<groupId>
cn.quantgroup
</groupId>
<version>
0.
1.6
</version>
<version>
0.
2.0
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
...
@@ -36,13 +36,6 @@
...
@@ -36,13 +36,6 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-autoconfigure
</artifactId>
<artifactId>
spring-boot-autoconfigure
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.16.6
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpclient
</artifactId>
<artifactId>
httpclient
</artifactId>
...
...
commons-core/pom.xml
View file @
3b3deea6
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
commons-parent
</artifactId>
<artifactId>
commons-parent
</artifactId>
<groupId>
cn.quantgroup
</groupId>
<groupId>
cn.quantgroup
</groupId>
<version>
0.
1.6
</version>
<version>
0.
2.0
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
...
...
commons-spring/pom.xml
View file @
3b3deea6
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<artifactId>
commons-parent
</artifactId>
<artifactId>
commons-parent
</artifactId>
<groupId>
cn.quantgroup
</groupId>
<groupId>
cn.quantgroup
</groupId>
<version>
0.
1.6
</version>
<version>
0.
2.0
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
...
@@ -84,12 +84,6 @@
...
@@ -84,12 +84,6 @@
<artifactId>
guava
</artifactId>
<artifactId>
guava
</artifactId>
<version>
${guava.version}
</version>
<version>
${guava.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.16.16
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
...
...
pom.xml
View file @
3b3deea6
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
cn.quantgroup
</groupId>
<groupId>
cn.quantgroup
</groupId>
<artifactId>
commons-parent
</artifactId>
<artifactId>
commons-parent
</artifactId>
<version>
0.
1.6
</version>
<version>
0.
2.0
</version>
<parent>
<parent>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
@@ -33,11 +33,18 @@
...
@@ -33,11 +33,18 @@
</properties>
</properties>
<dependencies>
<dependencies>
<!--所有工程基础依赖. apollo 配置中心-->
<dependency>
<dependency>
<groupId>
com.ctrip.framework.apollo
</groupId>
<groupId>
com.ctrip.framework.apollo
</groupId>
<artifactId>
apollo-client
</artifactId>
<artifactId>
apollo-client
</artifactId>
<version>
${apollo.client.version}
</version>
<version>
${apollo.client.version}
</version>
</dependency>
</dependency>
<!--所有工程基础依赖. lombok -->
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.16.20
</version>
</dependency>
</dependencies>
</dependencies>
<dependencyManagement>
<dependencyManagement>
...
@@ -45,22 +52,22 @@
...
@@ -45,22 +52,22 @@
<dependency>
<dependency>
<groupId>
cn.quantgroup
</groupId>
<groupId>
cn.quantgroup
</groupId>
<artifactId>
commons-spring
</artifactId>
<artifactId>
commons-spring
</artifactId>
<version>
0.
1.6
</version>
<version>
0.
2.0
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
cn.quantgroup
</groupId>
<groupId>
cn.quantgroup
</groupId>
<artifactId>
commons-core
</artifactId>
<artifactId>
commons-core
</artifactId>
<version>
0.
1.6
</version>
<version>
0.
2.0
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
cn.quantgroup
</groupId>
<groupId>
cn.quantgroup
</groupId>
<artifactId>
shutdown-spring-boot-starter
</artifactId>
<artifactId>
shutdown-spring-boot-starter
</artifactId>
<version>
0.
1.6
</version>
<version>
0.
2.0
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
cn.quantgroup
</groupId>
<groupId>
cn.quantgroup
</groupId>
<artifactId>
brave-spring-boot-starter
</artifactId>
<artifactId>
brave-spring-boot-starter
</artifactId>
<version>
0.
1.6
</version>
<version>
0.
2.0
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
...
...
shutdown-spring-boot-starter/pom.xml
View file @
3b3deea6
...
@@ -5,17 +5,13 @@
...
@@ -5,17 +5,13 @@
<parent>
<parent>
<artifactId>
commons-parent
</artifactId>
<artifactId>
commons-parent
</artifactId>
<groupId>
cn.quantgroup
</groupId>
<groupId>
cn.quantgroup
</groupId>
<version>
0.
1.6
</version>
<version>
0.
2.0
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
shutdown-spring-boot-starter
</artifactId>
<artifactId>
shutdown-spring-boot-starter
</artifactId>
<dependencies>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
<artifactId>
spring-boot-starter
</artifactId>
...
@@ -28,6 +24,12 @@
...
@@ -28,6 +24,12 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-autoconfigure
</artifactId>
<artifactId>
spring-boot-autoconfigure
</artifactId>
</dependency>
</dependency>
<!--以下为可选的-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
...
@@ -49,7 +51,6 @@
...
@@ -49,7 +51,6 @@
<optional>
true
</optional>
<optional>
true
</optional>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<artifactId>
lombok
</artifactId>
...
...
shutdown-spring-boot-starter/src/main/java/cn/quantgroup/tech/shutdown/DefaultSignalHandler.java
View file @
3b3deea6
...
@@ -28,9 +28,11 @@ public class DefaultSignalHandler implements SignalHandler {
...
@@ -28,9 +28,11 @@ public class DefaultSignalHandler implements SignalHandler {
log
.
info
(
"开始执行停止{}服务"
,
applicationName
);
log
.
info
(
"开始执行停止{}服务"
,
applicationName
);
GracefulShutdownProperties
bean
=
context
.
getBean
(
GracefulShutdownProperties
.
class
);
GracefulShutdownProperties
bean
=
context
.
getBean
(
GracefulShutdownProperties
.
class
);
try
{
try
{
//如果不是web应用. 这里会找不到shutdown bean
context
.
getBean
(
Shutdown
.
class
).
shutdown
(
bean
.
getTimeout
());
context
.
getBean
(
Shutdown
.
class
).
shutdown
(
bean
.
getTimeout
());
log
.
info
(
"servlet container 停止接收请求"
);
log
.
info
(
"servlet container 停止接收请求"
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"Web 容器 shutdown 失败, 可能没有 Web 容器"
);
}
}
log
.
info
(
"{} 即将执行 @PreDestroy 方法"
,
applicationName
);
log
.
info
(
"{} 即将执行 @PreDestroy 方法"
,
applicationName
);
System
.
exit
(
0
);
System
.
exit
(
0
);
...
...
shutdown-spring-boot-starter/src/main/java/cn/quantgroup/tech/shutdown/configuration/GracefulShutdownAutoConfiguration.java
View file @
3b3deea6
...
@@ -21,7 +21,6 @@ import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory
...
@@ -21,7 +21,6 @@ import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory
import
org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory
;
import
org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory
;
import
org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory
;
import
org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory
;
import
org.springframework.boot.context.embedded.undertow.UndertowDeploymentInfoCustomizer
;
import
org.springframework.boot.context.embedded.undertow.UndertowDeploymentInfoCustomizer
;
import
org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainer
;
import
org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory
;
import
org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContext
;
...
...
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