spring-projects / spring-boot

Spring Boot
https://spring.io/projects/spring-boot
Apache License 2.0
75.01k stars 40.65k forks source link

spring boot version update failed #34825

Closed yuluo-yx closed 1 year ago

yuluo-yx commented 1 year ago

background

I get the following error when I upgrade the version of Spring Boot from 2.6.7 to 3.0.0

description

Main class

    public static void main(String[] args) {
        SpringApplication application = new SpringApplication(MainApplication.class);
        ConfigurableApplicationContext applicationContext = application.run(args);

        DefaultMQProducer bean = applicationContext.getBean(DefaultMQProducer.class);
        System.out.println("bean: " + bean);
      }

demo

https://github.com/yuluo-yx/spring-boot-demo1

scottfrederick commented 1 year ago

Auto-configuration of a RocketMQ org.apache.rocketmq.client.producer.DefaultMQProducer bean is provided by the rocketmq-spring project.

As noted in the migration guide, Spring Boot 3.0 requires auto-configurations to be registered differently than in previous versions of Spring Boot. It appears that rocketmq-spring only uses the Spring Boot 2.x compatible way of registering auto-configurations, and needs to be updated to support Spring Boot 3.x. You;ll need to request that from the project maintainers.

yuluo-yx commented 1 year ago

项目org.apache.rocketmq.client.producer.DefaultMQProducer提供了RocketMQ bean 的自动配置。rocketmq-spring

迁移指南中所述,Spring Boot 3.0 要求自动配置的注册方式与之前版本的 Spring Boot 不同。似乎rocketmq-spring只使用Spring Boot 2.x 兼容的方式注册自动配置,需要更新以支持 Spring Boot 3.x。您需要向项目维护者提出请求。

thanks!