Hi, I need to check two condition('AND'(both the condition should be satisfied)) on yml file while creating a bean. How do i do that, as @ConditionalOnProperty supports only one property configuration.
Closing as that is a spring-boot question, try asking here http://stackoverflow.com/questions/tagged/spring-boot
I ended up here searching for a solution to this problem so here is the solution.
@ConditionalOnExpression("${properties.first.property.enable:true} && ${properties.second.property.startServer:false}")
Check here for more info: http://stackoverflow.com/questions/40477251/spring-boot-spel-conditionalonexpression-check-multiple-properties/40497419#40497419
Most helpful comment
I ended up here searching for a solution to this problem so here is the solution.
@ConditionalOnExpression("${properties.first.property.enable:true} && ${properties.second.property.startServer:false}")Check here for more info: http://stackoverflow.com/questions/40477251/spring-boot-spel-conditionalonexpression-check-multiple-properties/40497419#40497419