Commit 161fa850 authored by 小强's avatar 小强 Committed by Jason Song

add property to control whether to enable embedded eureka server or not

parent 2d02cbf0
......@@ -2,3 +2,7 @@
spring.datasource.url = ${spring_datasource_url}
spring.datasource.username = ${spring_datasource_username}
spring.datasource.password = ${spring_datasource_password}
#apollo.eureka.server.enabled=true
#apollo.eureka.client.enabled=true
\ No newline at end of file
package com.ctrip.framework.apollo.configservice;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Configuration;
/**
* Start Eureka Client annotations according to configuration
*
* @author Zhiqiang Lin(linzhiqiang0514@163.com)
*/
@Configuration
@EnableEurekaClient
@ConditionalOnProperty(name = "apollo.eureka.client.enabled", havingValue = "true", matchIfMissing = true)
public class ConfigServerEurekaClientConfigure {
}
package com.ctrip.framework.apollo.configservice;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.context.annotation.Configuration;
/**
* Start Eureka Server annotations according to configuration
*
* @author Zhiqiang Lin(linzhiqiang0514@163.com)
*/
@Configuration
@EnableEurekaServer
@ConditionalOnProperty(name = "apollo.eureka.server.enabled", havingValue = "true", matchIfMissing = true)
public class ConfigServerEurekaServerConfigure {
}
......@@ -19,7 +19,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
* @author Jason Song(song_s@ctrip.com)
*/
@EnableEurekaServer
@EnableAspectJAutoProxy
@EnableAutoConfiguration // (exclude = EurekaClientConfigBean.class)
@Configuration
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment