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
345cc9b6
Commit
345cc9b6
authored
Jul 31, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert Eureka client autoconfig to @EnableEurekaClient
parent
10d1ed38
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
14 deletions
+60
-14
EnableEurekaClient.java
...framework/platform/netflix/eureka/EnableEurekaClient.java
+36
-0
EurekaClientConfiguration.java
...rk/platform/netflix/eureka/EurekaClientConfiguration.java
+2
-2
EurekaServerAutoConfiguration.java
...latform/netflix/eureka/EurekaServerAutoConfiguration.java
+1
-1
spring.factories
...netflix-core/src/main/resources/META-INF/spring.factories
+0
-2
pom.xml
spring-platform-netflix-hystrix/pom.xml
+7
-0
pom.xml
spring-platform-netflix-turbine/pom.xml
+7
-0
pom.xml
spring-platform-netflix-zuul/pom.xml
+7
-9
No files found.
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/eureka/EnableEurekaClient.java
0 → 100644
View file @
345cc9b6
/*
* Copyright 2013-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
springframework
.
platform
.
netflix
.
eureka
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
import
org.springframework.context.annotation.Import
;
/**
* @author Dave Syer
*
*/
@Target
(
ElementType
.
TYPE
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
@Import
(
EurekaClientConfiguration
.
class
)
public
@interface
EnableEurekaClient
{
}
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/eureka/EurekaClient
Auto
Configuration.java
→
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/eureka/EurekaClientConfiguration.java
View file @
345cc9b6
...
...
@@ -43,10 +43,10 @@ import com.netflix.discovery.EurekaClientConfig;
EurekaInstanceConfigBean
.
class
})
@ConditionalOnClass
(
EurekaClientConfig
.
class
)
@ConditionalOnExpression
(
"${eureka.client.enabled:true}"
)
public
class
EurekaClient
Auto
Configuration
implements
public
class
EurekaClientConfiguration
implements
ApplicationListener
<
ContextRefreshedEvent
>,
SmartLifecycle
,
Ordered
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
EurekaClient
Auto
Configuration
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
EurekaClientConfiguration
.
class
);
private
boolean
running
;
...
...
spring-platform-netflix-core/src/main/java/org/springframework/platform/netflix/eureka/EurekaServerAutoConfiguration.java
View file @
345cc9b6
...
...
@@ -32,7 +32,6 @@ import com.netflix.blitz4j.LoggingConfiguration;
import
com.netflix.eureka.EurekaBootStrap
;
import
com.netflix.eureka.EurekaServerConfig
;
import
com.netflix.eureka.EurekaServerConfigurationManager
;
import
com.netflix.eureka.PeerAwareInstanceRegistry
;
/**
* @author Dave Syer
...
...
@@ -42,6 +41,7 @@ import com.netflix.eureka.PeerAwareInstanceRegistry;
@EnableConfigurationProperties
(
EurekaServerConfigBean
.
class
)
@ConditionalOnClass
(
EurekaServerConfig
.
class
)
@ConditionalOnExpression
(
"${eureka.server.enabled:true}"
)
@EnableEurekaClient
public
class
EurekaServerAutoConfiguration
implements
ServletContextAware
,
SmartLifecycle
,
Ordered
{
...
...
spring-platform-netflix-core/src/main/resources/META-INF/spring.factories
View file @
345cc9b6
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.platform.netflix.archaius.ArchaiusAutoConfiguration,\
org.springframework.platform.netflix.eureka.EurekaClientAutoConfiguration,\
org.springframework.platform.netflix.eureka.EurekaServerAutoConfiguration,\
org.springframework.platform.netflix.feign.FeignAutoConfiguration
\ No newline at end of file
spring-platform-netflix-hystrix/pom.xml
View file @
345cc9b6
...
...
@@ -18,6 +18,13 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<plugin>
<!--skip deploy (this is just a test module) -->
<artifactId>
maven-deploy-plugin
</artifactId>
<configuration>
<skip>
true
</skip>
</configuration>
</plugin>
</plugins>
</build>
...
...
spring-platform-netflix-turbine/pom.xml
View file @
345cc9b6
...
...
@@ -18,6 +18,13 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<plugin>
<!--skip deploy (this is just a test module) -->
<artifactId>
maven-deploy-plugin
</artifactId>
<configuration>
<skip>
true
</skip>
</configuration>
</plugin>
</plugins>
</build>
...
...
spring-platform-netflix-zuul/pom.xml
View file @
345cc9b6
...
...
@@ -17,18 +17,16 @@
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.1
</version>
<configuration>
<source>
1.7
</source>
<target>
1.7
</target>
</configuration>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<plugin>
<!--skip deploy (this is just a test module) -->
<artifactId>
maven-deploy-plugin
</artifactId>
<configuration>
<skip>
true
</skip>
</configuration>
</plugin>
</plugins>
</build>
...
...
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