If I use the spring boot application as below, I am getting the warning message
"More than one implementation of @EnableDiscoveryClient ********".
Service instance is getting registered when I run this tomcat but same instance
is not registering in JBOSS EAP 6.1
Warning message in tomcat and JBOSS respectively
Tomcat:
More than one implementation of @EnableDiscoveryClient (now relying on
@Conditionals to pick one):
[org.springframework.cloud.zookeeper.discovery.ZookeeperDiscoveryClientConfiguration,
org.springframework.cloud.netflix.eureka.EurekaDiscoveryClientConfiguration]
JBOSS EAP
More than one implementation of @EnableDiscoveryClient (now relying on
@Conditionals to pick one):
[org.springframework.cloud.netflix.eureka.EurekaDiscoveryClientConfiguration,
org.springframework.cloud.zookeeper.discovery.ZookeeperDiscoveryClientConfiguration]
We can notice the order of discovery clients are different in two servers, no
sure because of this it's registering in tomcar and not with JBOSS as I want to
use ZookeeperDiscoveryClientConfiguration.
If I remove @EnableDiscoveryClient on spring boot, instance is connecting
zookeeper but not registering.
But I want to run this in JBOSS EAP so is there anyway to disable loading
EurekaDiscoveryClientConfiguration and use only
ZookeeperDiscoveryClientConfiguration.
@SpringBootApplication
@EnableDiscoveryClient
public class DemoApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
Bootstrap.yml
spring:
cloud:
zookeeper:
connect-string: localhost:2181
loadBalancerType: ROUND_ROBIN
Thanks.
Regards,
Rao
+91- 77 606 333 11
________________________________
http://www.mindtree.com/email/disclaimer.html