Answers for "show all spring boot beans"

0

show all spring boot beans

@Bean
	public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
		return args -> {

			System.out.println("Let's inspect the beans provided by Spring Boot:");

			String[] beanNames = ctx.getBeanDefinitionNames();
			Arrays.sort(beanNames);
			for (String beanName : beanNames) {
				System.out.println("my beans "+beanName);
			}
		};
	}
Posted by: Guest on December-26-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language