Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
matrix
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mall
arch
matrix
Commits
479dcc8d
Commit
479dcc8d
authored
May 31, 2019
by
QIANGLU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add url
parent
ee1499e1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
ApolloContextInitializer.java
config-starter/src/main/java/com/secoo/mall/config/internals/ApolloContextInitializer.java
+2
-0
app.properties
config-starter/src/main/resources/META-INF/app.properties
+2
-2
No files found.
config-starter/src/main/java/com/secoo/mall/config/internals/ApolloContextInitializer.java
View file @
479dcc8d
...
...
@@ -22,8 +22,10 @@ public class ApolloContextInitializer implements ApplicationContextInitializer<C
public
void
postProcessEnvironment
(
ConfigurableEnvironment
environment
,
SpringApplication
application
)
{
String
appId
=
environment
.
getProperty
(
"spring.application.name"
);
String
cacheDir
=
environment
.
getProperty
(
"apollo.cacheDir"
,
"/data/cacheDir"
);
if
(!
StringUtils
.
isEmpty
(
appId
))
{
System
.
setProperty
(
"app.id"
,
appId
);
System
.
setProperty
(
"apollo.cacheDir"
,
cacheDir
);
}
}
...
...
config-starter/src/main/resources/META-INF/app.properties
View file @
479dcc8d
apollo.meta
=
http://localhost:8080
\ No newline at end of file
apollo.meta
=
http://10.0.253.149:8080
\ No newline at end of file
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