PrepZone Logo
PrepZone
Back to Spring Boot

Spring Boot · Medium

What is @ConditionalOnProperty and when would you use it?

Spring BootAuto-Config & StartersConditional BeansSeniorStaff

Answer preview

Overview: @ConditionalOnProperty conditionally activates a bean or configuration based on the presence and value of a property in the Spring Environment.…