Spring Cloud Stream @SendTo Annotation not working

自闭症网瘾萝莉.ら 提交于 2019-12-01 12:30:55

What leads you to believe that @SendTo on its own is supported? @SendTo is a secondary annotation used by many projects, not just Spring Cloud Stream; as far as I know, there is nothing that will look for it on its own.

Try Spring Integration's @Publisher annotation instead (with @EnablePublisher).

EDIT

To force proxying with CGLIB instead of a JDK proxy, you can do this...

@Bean
public static BeanFactoryPostProcessor bfpp() {
    return bf -> {
        bf.getBean(IntegrationContextUtils.PUBLISHER_ANNOTATION_POSTPROCESSOR_NAME,
                PublisherAnnotationBeanPostProcessor.class).setProxyTargetClass(true);
    };
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!