If spring boot application is running and any of the property configuration is modified in configuration files like application.properties, This auto configuration report will be shown in console log.



Auto Configuration Report

Negative matches:
 JpaBaseConfiguration.JpaWebConfiguration:
       Did not match:
          - @ConditionalOnProperty (spring.jpa.open-in-view=true) found different value in property 'open-in-view' (OnPropertyCondition)
Positive matches:
JpaBaseConfiguration.JpaWebConfiguration matched:
  - @ConditionalOnProperty (spring.jpa.open-in-view=true) matched (OnPropertyCondition)


Root Cause

The auto configuration is enabled in spring boot application. If any configuration is added, changed or removed from the configuration file such as application.properties, the auto configuration causes reloading of the dependent beans.



Reason

@ConditionalOnProperty - Conditional that checks if the specified properties have a specific value. By default the properties must be present in the Environment and not equal to false. 

Explanation

In the above example, ‘open-in-view’ is a property used by spring boot application. This property value can be modified using configuration ‘spring.jpa.open-in-view’.

‘open-in-view’ property must be present in the spring boot environment and not equal to false.

If the property is set to false, then the “ConditionalOnProperty” did not match with expected value (not equal to false), this property is shown in “Did not match” in “Negative matches” section

If the property is set to true, then the “ConditionalOnProperty” matches with expected value (not equal to false), this property is shown in “Matched” in “Positive matches” section

spring.jpa.open-in-view=false



Leave a Reply