RocketMQTemplate injection failed

When using rocketmq to send a message, you will find

 @Autowired
 private RocketMQTemplate rocketMQTemplate;

Failed to inject RocketMQTemplate.
The reason is that in the configuration file, we did not add

Insert picture description here
the two blue lines of code in the above figure to specify the group name to be sent . After writing, the problem is solved.

In this life, persistence or non-persistence is not terrible, what is afraid is to walk alone on the road of persistence!

Guess you like

Origin blog.csdn.net/taiguolaotu/article/details/113447642