You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/02/23 12:32:37 UTC
[GitHub] [rocketmq] fengyiluo commented on issue #2691: application.yml文件中为通道配置的生产者属性没有加载到ExtendedProducerProperties里面
fengyiluo commented on issue #2691:
URL: https://github.com/apache/rocketmq/issues/2691#issuecomment-784168443
启动类里应该加上@EnableBinding(ProducerChannel.class),注意这里没有大括号。
@SpringBootApplication
@EnableBinding(ProducerChannel.class)
public class ProducerStarter {
public static void main(String[] args) {
SpringApplication.run(ProducerStarter.class, args);
}
}
//发送消息的方法如下:
@Autowired
private ProducerChannel producerChannel;
//...
public void testSend(){
producerChannel. objectTx().send(msg);
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org