Prudhvi Gudala
Prudhvi Gudala

Reputation: 113

Facing issue with Microservice using netflix zuul in SpringBoot


APPLICATION FAILED TO START


Description:

The bean 'counterFactory', defined in class path resource [org/springframework/cloud/netflix/zuul/ZuulServerAutoConfiguration$ZuulCounterFactoryConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/cloud/netflix/zuul/ZuulServerAutoConfiguration$ZuulMetricsConfiguration.class] and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

Upvotes: 11

Views: 4456

Answers (2)

chmk
chmk

Reputation: 57

This will solve by adding below config in yml or properties file.

    spring:
      main:
        allow-bean-definition-overriding: true

Upvotes: -2

Bhanuj
Bhanuj

Reputation: 166

Use the Spring Boot version of 2.0.x...they haven't introduced the Zuul support for 2.1.x

Thanks

Upvotes: 15

Related Questions