fishautumn opened a new issue, #477: URL: https://github.com/apache/rocketmq-spring/issues/477
Interface `ConfigurableEnvironment` should be enough for bellow code: code link: https://github.com/apache/rocketmq-spring/blob/21097621e092a618709f8220ee2ccd0acbaa3af0/rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/autoconfigure/ListenerContainerConfiguration.java#L55 My application has a customized `ConfigurableEnvironment` implementation, but it cannot startup correctly. Below is a demo code fragment: ```java @SpringBootApplication public class App { @Resource private RocketMQTemplate rocketMQTemplate; public static void main(String[] args) { SpringApplication app = new SpringApplication(App.class); app.setEnvironment(new MyEnv()); // comment out this line fixies the problem app.run(args); } static class MyEnv extends AbstractEnvironment { } } ``` it reports bellow error on startup: ``` Error creating bean with name 'org.apache.rocketmq.spring.autoconfigure.ListenerContainerConfiguration': Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.core.env.StandardEnvironment' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} ``` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
