Auto-configuration

Auto-configuration is one of the most important features of Spring Boot. The auto-configuration endpoint (/application/autoconfig) exposes the details related to auto-configuration. It shows both positive matches and negative matches with details about why a particular auto-configuration succeeded or failed.

The following extract shows some of the positive matches from the response:

"positiveMatches": {
"AuditAutoConfiguration#auditListener": [
{
"condition": "OnBeanCondition",
"message": "@ConditionalOnMissingBean (types:
org.springframework.boot.actuate.audit.
listener.AbstractAuditListener; SearchStrategy: all) did not find
any beans"
}
],
"AuditAutoConfiguration#authenticationAuditListener": [
{
"condition": "OnClassCondition",
"message": "@ConditionalOnClass found required class
'org.springframework.security.authentication.
event.AbstractAuthenticationEvent'"
},

The following extract shows some of the negative ;matches from the response:

"negativeMatches": {
"CacheStatisticsAutoConfiguration.
CaffeineCacheStatisticsProviderConfiguration": [
{
"condition": "OnClassCondition",
"message": "@ConditionalOnClass did not find required class
'com.github.benmanes.caffeine.cache.Caffeine'"
}
],
"CacheStatisticsAutoConfiguration.
EhCacheCacheStatisticsProviderConfiguration": [
{
"condition": "OnClassCondition",
"message": "@ConditionalOnClass did not find required classes
'net.sf.ehcache.Ehcache',
'net.sf.ehcache.statistics.StatisticsGateway'"
}
],

All these details are very useful in order to debug auto-configuration.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset