Closed h735004790 closed 4 years ago
could you please provide a project that reproduces the issue?
@fangjian0423 when project use Apollo configuration center of XieCheng,project will be started failed,the same problem that:A component required a bean of type 'org.apache.rocketmq.spring.core.RocketMQTemplate' that could not be found.
I think the configuration items about rocketmq.name-server
& rocketmq.producer.group
is not configured in Apollo, so the RocketMQAutoConfiguration
didn't work.
I think the configuration items about
rocketmq.name-server
&rocketmq.producer.group
is not configured in Apollo, so theRocketMQAutoConfiguration
didn't work.
but after packing rocketmq-spring-boot-starter jar for project then rocketmq.producer.group is must be configured can be used I want to know how his loading order is solved.
i also encountered this problem.
i also encountered this problem.
As fangjian0423 said, have you configured items about rocketmq.name-server
& rocketmq.producer.group
?
Startup with debug mode or see conditions
endpoint to find why RocketMQAutoConfiguration
didn't work.
Any update for this issue?
i have added rocketmq.name-server and rocketmq.producer.group, but it still can't work .
解决了吗?
我也出现了这个问题,版本是2.1.0.后来看了下application.yml配置为
spring:
rocketmq:
name-server: xxxxx
producer:
group:xxxxxx
看了下RocketMQAutoConfiguration,[笑哭]了,原来配置前缀是prefix="rocketmq"不是prefix="spring.rocketmq" 正确的配置应该是:
spring:
redis:
database: 0
host: localhost
........
rocketmq:
name-server: 172.16.21.138:9876
producer:
group: short-message
注意rocketmq和spring同层级
主要是看着datasource,redis,es都是以spring为前缀,也就想当然认为rocketmq也是以spring为大前缀
springboot2.x and rocketmq-spring-boot-starter2.0.3,when start, Description:
A component required a bean of type 'org.apache.rocketmq.spring.core.RocketMQTemplate' that could not be found.
The following candidates were found but could not be injected: