rocketmq-spring
rocketmq-spring copied to clipboard
RocketMQAutoConfiguration was not automatically injected
trafficstars
BUG REPORT
- Please describe the issue you observed:
-
What did you do (The steps to reproduce)? Add
rocketmq-spring-boot-starterdependency and provide the correct configuration information inapplication.yaml. -
What did you expect to see?
RocketMQTemplatecan be injected. -
What did you see instead?
RocketMQTemplatenot injected.
- Please tell us about your environment:
- JDK 17
- Spring Boot 3.1.0
- Spring Cloud 2022.0.3
- rocketmq-spring-boot-starter 2.2.3
- Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
I manually added
RocketMQAutoConfigurationto the automatic configuration listorg.springframework.boot.autoconfigure.AutoConfiguration.importsto successfully injectRocketMQTemplate.
try run the demo "ProducerApplication", check RocketMQAutoConfiguration run or not
好像是 sprngboot3.x 调整了自动装配的机制
spring 3.0 依赖 jdk17
@PostConstruct 注解从javax.annotation包改成了jakarta.annotation,导致starter包里面所有的注解都未生效。