问题背景:从本地调用服务器的dubbo接口进行测试
实现思路:基于IDEA+Spring+maven+Dubbo搭建测试项目,从本地直接调用
具体实现思路可参考博客:https://www.cnblogs.com/xiuxingzhe/p/9250737.html
碰到问题:引入测试目标jar后,调用其接口运行测试类时,报错如下
Caused by: java.lang.IllegalStateException: Duplicate spring bean id cfgDistributorServiceImpl at com.alibaba.dubbo.config.spring.schema.DubboBeanDefinitionParser.parse(DubboBeanDefinitionParser.java:106) at com.alibaba.dubbo.config.spring.schema.DubboBeanDefinitionParser.parse(DubboBeanDefinitionParser.java:77) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandl