Print all beans loaded by Spring Boot

Previous

In this post, we will see how to print all the beans loaded by Spring boot.

We have already created a sample spring boot hello world program using JSP. You must be wondering what beans have been loaded by Spring in background.

Change SpringBootHelloWorldApplication.java as below:

You just need to implement CommandLineRunner and get ApplicatationContext object using @Autowire annotation.

basicErrorController
beanNameHandlerMapping
beanNameViewResolver
characterEncodingFilter
conventionErrorViewResolver
defaultServletHandlerMapping
defaultValidator
defaultViewResolver
dispatcherServlet
dispatcherServletRegistration
duplicateServerPropertiesDetector
embeddedServletContainerCustomizerBeanPostProcessor
error
errorAttributes
errorPageCustomizer
errorPageRegistrarBeanPostProcessor
faviconHandlerMapping
faviconRequestHandler
handlerExceptionResolver
helloWorldController
hiddenHttpMethodFilter
httpPutFormContentFilter
httpRequestHandlerAdapter
jacksonObjectMapper
jacksonObjectMapperBuilder
jsonComponentModule
localeCharsetMappingsCustomizer
mappingJackson2HttpMessageConverter

That’s all about how to print all the beans loaded by Spring boot

Previous

Join Our News Letter - Stay Updated

Subscribe to Awesome Java Content.

Add Comment

Join Our News Letter - Stay Updated

Subscribe to Awesome Java Content.
You can like our facebook page Java2blog