记录:non-compatible bean definition of same name and class [com.XXX.XXX]
来源:互联网 发布:霍华德站立摸高数据 编辑:程序博客网 时间:2024/06/03 13:36
启动 springBoot 工程时报错: Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'userLogAspect' for bean class [com.foreveross.security.config.UserLogAspect] conflicts with existing, non-compatible bean definition of same name and class [com.config.UserLogAspect]
两个maven工程一个作为服务提供方,一个作为消费方。
引用提供方提供的RPC接口:
<!-- 引用的服务,那个interface一定是一个被引入到DUBBO仓库的接口定义,
注意check=false,表示zookeeper不检查提供者是否存在 protocol="dubbo" 对于双协议只使用声明的协议--> <dubbo:reference interface="com.foreveross.security.service.rpc.api.UserLogService" id="myUserLogService" protocol="dubbo" group="xmlConfig" check="false" />
在pom.xml中导入服务提供方工程,问题出在 提供方工程中已有一个 UserLogAspect 类,消费方工程中也恰恰有这样一个同名的类。
所以报错 class 已存在,重复。
去掉任意一方的这个类,或者改名就行了。
阅读全文
1 0
- 记录:non-compatible bean definition of same name and class [com.XXX.XXX]
- 异常解决:non-compatible bean definition of same name and class【com.xxx.xxx.XXX】
- non-compatible bean definition of same name and class [x
- ....conflicts with existing, non-compatible bean definition of same name and class
- conflicts with existing, non-compatible bean definition of same name and class
- SpringMVC conflicts with existing, non-compatible bean definition of same name and class 的解决办法
- SpringMVC 启动报错,conflicts with existing, non-compatible bean definition of same name and class ...
- [工作点滴]SpringMVC conflicts with existing, non-compatible bean definition of same name and class
- conflicts with existing, non-compatible bean definition of same name and class
- SpringMVC conflicts with existing, non-compatible bean definition of same name and class 的解决办法
- SpringMVC conflicts with existing, non-compatible bean definition of same name and class 的解决办法,sprin
- SpringMVC中类名重名(SpringMVC conflicts with existing, non-compatible bean definition of same name )
- Class has two properties of the same name "xxx"
- multiple definition of XXX
- Use of the same entity name twice: XXX
- 问题解决: multiple definition of XXX
- cannot find class [xxx] for bean with name
- cannot find class [xxx] for bean with name
- Html-如何正确给table加边框
- Java IO
- ORA-09925: Unable to create audit trail file
- Linux基础——第一关
- VMware12版虚拟机怎么安装win7系统(详细教程)
- 记录:non-compatible bean definition of same name and class [com.XXX.XXX]
- Java通过python命令执行DataX任务
- WINDOW与LINUX的TCP/IP通信
- Git,GitHub入门
- laytpl--前端数据绑定
- Best Time to Buy and Sell Stock II(leetcode)
- URI和URL的区别
- Eclipse的菜单简介
- MySQL学习