spring boot-spring cloud stream Input和outPut同名启动报错

看的是廖师兄的课程,里面说到配置StreamClient的时候,取得同名,服务启动报错

public interface StreamClient {
   String INPUT = "myMessage";

   @Input(StreamClient.INPUT)
   SubscribableChannel myInput();

   @Output(StreamClient.INPUT)
   MessageChannel myOutput();
}

springboot:2.0.0.RELEASE

springcloud:Finchley.SR2


报错信息

org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'myMessage' defined in com.littlehao.order.message.StreamClient: bean definition with this name already exists - Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=com.littlehao.order.message.StreamClient; factoryMethodName=myOutput; initMethodName=null; destroyMethodName=null

https://img.mukewang.com/5c10dbcc0001954317970071.jpg

慕前端5345688
浏览 2889回答 4
4回答

麻了一一一

我也遇到同样的问题了,困扰好久解决不了,请问您这解决了吗?
打开App,查看更多内容
随时随地看视频慕课网APP