配置类中的延迟初始化
@Configuration
// @Lazy - For all Beans to load lazily
public class AppConf {
@Bean
@Lazy
public Demo demo() {
return new Demo();
}
}
@Configuration
// @Lazy - For all Beans to load lazily
public class AppConf {
@Bean
@Lazy
public Demo demo() {
return new Demo();
}
}