This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class AppConfig { | |
// @return Spring Boot {@link CommandLineRunner} automatically | |
// run after app context is loaded. | |
@Bean | |
public CommandLineRunner commandLineRunner(ApplicationContext ctx) { | |
return args -> { | |
System.out.println("Let's inspect the beans provided by Spring Boot:\n"); | |
String[] beanNames = ctx.getBeanDefinitionNames(); | |
Arrays.sort(beanNames); |