spring boot org.springframework.context.annotation.ConflictingBeanDefinitionException
程序员文章站
2022-04-12 20:28:25
...
分析接解决方法
annotation.ConflictingBeanDefinitionException说明是系统内的注解错误,在继续往下看bean definition of same name 定义了相同的bean这就看你系统内的service及component里面写的名称是不是有重复的?如果是修改点重复的就可以了。
org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean ****name ‘DeExecutor’ for bean class [com.DefRuleExecutor] conflicts with existing, non-compatible bean definition of same name and class
错误信息
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com..Application]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean **name 'DeExecutor' for bean class [com.Executor] conflicts with existing, non-compatible bean definition of same name and class** [com.r.Executor]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:184)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:316)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:271)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:91)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:692)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:530)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1242)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1230)
at com.main(Application.java:11)
Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'DefRuleExecutor' for bean class [com..Executor] conflicts with existing, non-compatible bean definition of same name and class [com.Executor]
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.checkCandidate(ClassPathBeanDefinitionScanner.java:348)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:286)
at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:132)
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:288)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:202)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:170)
... 13 common frames omitted
推荐阅读
-
Spring MVC HelloWorld入门及运行机制 (一)
-
spring boot 打jar包,获取resource路径下的文件
-
Spring JDBC
-
Spring Cloud 之 Feign.
-
Spring笔记4
-
Spring+SpringMVC+MyBatis集成(SSM)
-
Spring MVC源码(三) ----- @RequestBody和@ResponseBody原理解析
-
基于Spring Cloud Netflix的TCC柔性事务和EDA事件驱动示例
-
序列化表单为json对象,datagrid带额外参提交一次查询 后台用Spring data JPA 实现带条件的分页查询 多表关联查询
-
spring的开发