在Spring Boot 2.2中,您可以默认将所有bean标记为惰性。
如果我通过以下方式打开
spring.main.lazy-initialization=true
我收到以下消息:
***************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean named 'errorChannel' that could not be found.
引用此代码的相关代码为:
@MessagingGateway(errorChannel = "errorChannel")
@FunctionalInterface
public interface SomeInterface {
惰性设置似乎已阻止Spring Integration创建errorChannel。
如何在这里将errorChannel bean标记为不懒惰?
我又如何在Spring Boot 2.2中默认情况下将其他类从懒惰中排除呢?