The bean 'counterFactory', defined in class path resource [org/springframework/cloud/netflix/zuul/Zu
2019-01-17 19:45
3415 查看
SpringCloud启动zuul时,报如下错误:
查询发现是Springboot的版本问题,我这里springbood版本是2.1.0,SpringCloud是F版本。把SpringBoot版本降到2.0.6即可。
2018-11-29 15:54:38.127 INFO 30532 --- [ main] com.java4all.ZuulServer1Application : No active profile set, falling back to default profiles: default 2018-11-29 15:54:38.789 WARN 30532 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format. 2018-11-29 15:54:38.798 WARN 30532 --- [ main] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'hystrix.stream' contains invalid characters, please migrate to a valid format. 2018-11-29 15:54:38.823 WARN 30532 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'counterFactory' defined in class path resource [org/springframework/cloud/netflix/zuul/ZuulServerAutoConfiguration$ZuulCounterFactoryConfiguration.class]: Cannot register bean definition [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.netflix.zuul.ZuulServerAutoConfiguration$ZuulCounterFactoryConfiguration; factoryMethodName=counterFactory; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/cloud/netflix/zuul/ZuulServerAutoConfiguration$ZuulCounterFactoryConfiguration.class]] for bean 'counterFactory': There is already [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.cloud.netflix.zuul.ZuulServerAutoConfiguration$ZuulMetricsConfiguration; factoryMethodName=counterFactory; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/cloud/netflix/zuul/ZuulServerAutoConfiguration$ZuulMetricsConfiguration.class]] bound. 2018-11-29 15:54:38.835 INFO 30532 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-11-29 15:54:38.837 ERROR 30532 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** 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 Disconnected from the target VM, address: '127.0.0.1:7509', transport: 'socket' Process finished with exit code 1
转自:https://blog.csdn.net/weixin_39800144/article/details/84634934
相关文章推荐
- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from class path resource
- Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-mybatis.xml
- Invalid bean definition with name 'dataSource' defined in class path resource [spring-mybatis.xml]:
- IDEA 启动 Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-m
- Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path resource
- MyBatis笔记----(2017年)最新的报错:Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in class path resource [com/ij34/mybatis/applicationContext.xml]; nested e
- 控制台报错:Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-er
- Error creating bean with name 'sessionFactory' defined in class path resource [spring/applicationCon
- java.io.FileNotFoundException: class path resource [templates/] spring-cloud-netflix-eureka-server
- 报错:Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error
- SpringBoot异常:Error creating bean with name 'entityManagerFactory' defined in class path resource
- Spring 整合Hibernate报错:Error creating bean with name 'dataSource' defined in class path resource
- ssm出现Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/applic
- Failed to introspect Class [org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfigura
- Spring MVC集成thymeleaf时提示:defined in ServletContext resource [/WEB-INF/SrpingMVCTest-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException
- Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-mybatis.xml
- Error creating bean with name \'claimVoucherInfoServiceImpl\' defined in class path resource [applic
- 解决:ClassCastException: org.springframework.util.LinkedCaseInsensi
- Error creating bean with name ‘…’defined in class path resource[applicationContext2.xml]:问题及其解决方法
- Caused by: org.springframework.beans.NullValueInNestedPathException: Invalid property 'xxxx'