spring启动类顺序
@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++;
\}
\};
\}
还没有评论,来说两句吧...