Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
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
haoban3.0
haoban-manage3.0
Commits
5fcfde8a
Commit
5fcfde8a
authored
Apr 21, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
key
parent
7082606a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
HoloDataSource.java
...anage/service/dao/mapper/content/holo/HoloDataSource.java
+3
-1
ApolloUtils.java
.../java/com/gic/haoban/manage/service/util/ApolloUtils.java
+2
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/content/holo/HoloDataSource.java
View file @
5fcfde8a
...
@@ -44,6 +44,8 @@ public class HoloDataSource implements InitializingBean, DisposableBean {
...
@@ -44,6 +44,8 @@ public class HoloDataSource implements InitializingBean, DisposableBean {
private
final
ScheduledExecutorService
scheduler
=
Executors
.
newScheduledThreadPool
(
1
);
private
final
ScheduledExecutorService
scheduler
=
Executors
.
newScheduledThreadPool
(
1
);
public
static
final
String
HOLO_CONNECTIONMAXIDLEMS
=
"holo.connectionMaxIdleMs"
;
@PostConstruct
@PostConstruct
public
void
initConfig
()
{
public
void
initConfig
()
{
Config
config
=
ConfigService
.
getAppConfig
();
Config
config
=
ConfigService
.
getAppConfig
();
...
@@ -56,7 +58,7 @@ public class HoloDataSource implements InitializingBean, DisposableBean {
...
@@ -56,7 +58,7 @@ public class HoloDataSource implements InitializingBean, DisposableBean {
}
}
TraceIdUtil
.
traceBegin
(
TraceIdUtil
.
EntranceType
.
QUARTZ
);
TraceIdUtil
.
traceBegin
(
TraceIdUtil
.
EntranceType
.
QUARTZ
);
log
.
info
(
"监听刷新holo"
);
log
.
info
(
"监听刷新holo"
);
ConfigChange
connectionMaxIdleMsChange
=
changeEvent
.
getChange
(
"holo.connectionMaxIdleMs"
);
ConfigChange
connectionMaxIdleMsChange
=
changeEvent
.
getChange
(
HOLO_CONNECTIONMAXIDLEMS
);
if
((
connectionMaxIdleMsChange
!=
null
&&
connectionMaxIdleMsChange
.
getNewValue
()
!=
null
))
{
if
((
connectionMaxIdleMsChange
!=
null
&&
connectionMaxIdleMsChange
.
getNewValue
()
!=
null
))
{
init
();
init
();
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/ApolloUtils.java
View file @
5fcfde8a
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.util;
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.util;
import
com.ctrip.framework.apollo.Config
;
import
com.ctrip.framework.apollo.Config
;
import
com.ctrip.framework.apollo.ConfigService
;
import
com.ctrip.framework.apollo.ConfigService
;
import
com.gic.haoban.manage.service.dao.mapper.content.holo.HoloDataSource
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -99,7 +100,7 @@ public class ApolloUtils {
...
@@ -99,7 +100,7 @@ public class ApolloUtils {
*/
*/
public
static
Integer
connectionMaxIdleMs
()
{
public
static
Integer
connectionMaxIdleMs
()
{
Config
config
=
ConfigService
.
getAppConfig
();
Config
config
=
ConfigService
.
getAppConfig
();
String
connectionMaxIdleMs
=
config
.
getProperty
(
"holo.connectionMaxIdleMs"
,
"9000"
);
String
connectionMaxIdleMs
=
config
.
getProperty
(
HoloDataSource
.
HOLO_CONNECTIONMAXIDLEMS
,
"9000"
);
return
Integer
.
parseInt
(
connectionMaxIdleMs
);
return
Integer
.
parseInt
(
connectionMaxIdleMs
);
}
}
}
}
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