1@Bean
2 public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
3 return args -> {
4
5 System.out.println("Let's inspect the beans provided by Spring Boot:");
6
7 String[] beanNames = ctx.getBeanDefinitionNames();
8 Arrays.sort(beanNames);
9 for (String beanName : beanNames) {
10 System.out.println("my beans "+beanName);
11 }
12 };
13 }