Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
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
openSource
spring-cloud-netflix
Commits
7b60ea73
Commit
7b60ea73
authored
Jul 17, 2014
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated RUNNING with new jar names;
only configure archaius once; add eureka-client to hystrix dashboard
parent
2f8ae888
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
RUNNING.md
RUNNING.md
+1
-1
ArchaiusAutoConfiguration.java
.../platform/netflix/archaius/ArchaiusAutoConfiguration.java
+12
-0
pom.xml
spring-platform-netflix-hystrix/pom.xml
+4
-0
No files found.
RUNNING.md
View file @
7b60ea73
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
## Config Server
## Config Server
`spring-platform-config$ java -Dspring.platform.config.server.uri=https://github.com/spencergibb/config-repo -jar spring-platform-config-server/target/spring-platform-config-server-1.0.0.BUILD-SNAPSHOT.jar`
`spring-platform-config$ java -Dspring.platform.config.server.uri=https://github.com/spencergibb/config-repo -jar spring-platform-config-server/target/spring-platform-config-server-1.0.0.BUILD-SNAPSHOT
-exec
.jar`
## Netflix Eureka
## Netflix Eureka
...
...
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/archaius/ArchaiusAutoConfiguration.java
View file @
7b60ea73
...
@@ -5,11 +5,15 @@ import com.netflix.config.ConfigurationManager;
...
@@ -5,11 +5,15 @@ import com.netflix.config.ConfigurationManager;
import
com.netflix.config.DynamicURLConfiguration
;
import
com.netflix.config.DynamicURLConfiguration
;
import
org.apache.commons.configuration.EnvironmentConfiguration
;
import
org.apache.commons.configuration.EnvironmentConfiguration
;
import
org.apache.commons.configuration.SystemConfiguration
;
import
org.apache.commons.configuration.SystemConfiguration
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
static
com
.
netflix
.
config
.
ConfigurationBasedDeploymentContext
.
DEPLOYMENT_APPLICATION_ID_PROPERTY
;
import
static
com
.
netflix
.
config
.
ConfigurationBasedDeploymentContext
.
DEPLOYMENT_APPLICATION_ID_PROPERTY
;
import
static
com
.
netflix
.
config
.
ConfigurationManager
.*;
import
static
com
.
netflix
.
config
.
ConfigurationManager
.*;
import
static
com
.
netflix
.
config
.
ConfigurationManager
.
APPLICATION_PROPERTIES
;
import
static
com
.
netflix
.
config
.
ConfigurationManager
.
APPLICATION_PROPERTIES
;
...
@@ -21,6 +25,9 @@ import static com.netflix.config.ConfigurationManager.ENV_CONFIG_NAME;
...
@@ -21,6 +25,9 @@ import static com.netflix.config.ConfigurationManager.ENV_CONFIG_NAME;
@Configuration
@Configuration
public
class
ArchaiusAutoConfiguration
{
public
class
ArchaiusAutoConfiguration
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ArchaiusAutoConfiguration
.
class
);
private
static
final
AtomicBoolean
initialized
=
new
AtomicBoolean
(
false
);
@Autowired
@Autowired
ConfigurableEnvironment
env
;
ConfigurableEnvironment
env
;
...
@@ -32,6 +39,7 @@ public class ArchaiusAutoConfiguration {
...
@@ -32,6 +39,7 @@ public class ArchaiusAutoConfiguration {
}
}
protected
void
configureArchaius
(
ConfigurableEnvironmentConfiguration
envConfig
)
{
protected
void
configureArchaius
(
ConfigurableEnvironmentConfiguration
envConfig
)
{
if
(
initialized
.
compareAndSet
(
false
,
true
))
{
String
appName
=
env
.
getProperty
(
"spring.application.name"
);
String
appName
=
env
.
getProperty
(
"spring.application.name"
);
if
(
appName
==
null
)
{
if
(
appName
==
null
)
{
throw
new
IllegalStateException
(
"spring.application.name may not be null"
);
throw
new
IllegalStateException
(
"spring.application.name may not be null"
);
...
@@ -74,5 +82,9 @@ public class ArchaiusAutoConfiguration {
...
@@ -74,5 +82,9 @@ public class ArchaiusAutoConfiguration {
config
.
setContainerConfigurationIndex
(
config
.
getIndexOfConfiguration
(
appOverrideConfig
));
config
.
setContainerConfigurationIndex
(
config
.
getIndexOfConfiguration
(
appOverrideConfig
));
ConfigurationManager
.
install
(
config
);
ConfigurationManager
.
install
(
config
);
}
else
{
//TODO: reinstall ConfigurationManager
logger
.
warn
(
"Netflix ConfigurationManager has already been installed, unable to re-install"
);
}
}
}
}
}
spring-platform-netflix-hystrix/pom.xml
View file @
7b60ea73
...
@@ -54,6 +54,10 @@
...
@@ -54,6 +54,10 @@
<artifactId>
spring-platform-config-client
</artifactId>
<artifactId>
spring-platform-config-client
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.netflix.eureka
</groupId>
<artifactId>
eureka-client
</artifactId>
</dependency>
<dependency>
<groupId>
com.netflix.hystrix
</groupId>
<groupId>
com.netflix.hystrix
</groupId>
<artifactId>
hystrix-core
</artifactId>
<artifactId>
hystrix-core
</artifactId>
</dependency>
</dependency>
...
...
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