@Bean
public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
return args -> {
LOGGER.info("Let's inspect the beans provided by Spring Boot:");
String[] beanNames = ctx.getBeanDefinitionNames();
Arrays.sort(beanNames);
int i = 0;
for (String beanName : beanNames) {
LOGGER.info("第" + i + "bean:" + beanName);
i++;
}
};
}
最后
以上就是强健马里奥最近收集整理的关于spring启动类顺序的全部内容,更多相关spring启动类顺序内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复