Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
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
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
head_group
xyqb-user2
Commits
348e0127
Commit
348e0127
authored
Jan 22, 2018
by
技术部-任文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sentry配置参数化(Apollo)
parent
761f7799
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
Bootstrap.java
src/main/java/cn/quantgroup/xyqb/Bootstrap.java
+6
-1
No files found.
src/main/java/cn/quantgroup/xyqb/Bootstrap.java
View file @
348e0127
...
@@ -13,6 +13,7 @@ import org.springframework.context.ConfigurableApplicationContext;
...
@@ -13,6 +13,7 @@ import org.springframework.context.ConfigurableApplicationContext;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.context.event.ContextRefreshedEvent
;
import
org.springframework.context.event.ContextRefreshedEvent
;
import
org.springframework.core.env.Environment
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
sun.misc.Signal
;
import
sun.misc.Signal
;
...
@@ -38,6 +39,10 @@ public class Bootstrap {
...
@@ -38,6 +39,10 @@ public class Bootstrap {
log
.
info
(
"server start..."
);
log
.
info
(
"server start..."
);
// 启用平滑退出功能
// 启用平滑退出功能
Signal
.
handle
(
new
Signal
(
"INT"
),
new
DefaultSignalHandler
(
run
));
Signal
.
handle
(
new
Signal
(
"INT"
),
new
DefaultSignalHandler
(
run
));
Sentry
.
init
(
"http://13ef5642903a414c910f8d0e0a2c56ee:8b351ad1abf44de3b4c25f39105fb927@172.16.4.89:9000/6"
);
// 异常log捕获
Environment
environment
=
run
.
getBean
(
Environment
.
class
);
String
dsn
=
environment
.
getProperty
(
"dsn"
);
Sentry
.
init
(
dsn
);
}
}
}
}
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