• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Viewing Spring Boot autoconfiguration

 
Ranch Hand
Posts: 90
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to print out Spring Boot's autoconfiguration as Spring XML configuration or in some other format? I would like to be able to inspect the autoconfiguration so that I can verify that the beans have been configured as I am expecting them to be configured.
 
author
Posts: 422
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Auto-configuration happens at runtime, not as code generation. Therefore, there's really not an XML config file or a Java class to look at.

However, if you have the Actuator in play at runtime, then the /beans endpoint will produce a JSON document describing all of the beans in the application context as well as what they're injected with. And the /autoconfig endpoint will produce a report explaining the auto-configuration decisions that were made (grouped by conditions that passed and conditions that failed).
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic