I want to load a bean based on two String property value matching conditions.
Egg:
application.properties
foo.test.alpha=sodium
foo.test.beta=chlorine
Bean Config:
@Bean
@ConditionalOnProperty(prefix = "foo.test", name = "alpha", havingValue = "sodium")
public DefaultErrorHandler defaultErrorHandler(final DeadLetterPublishingRecoverer deadLetterPublishRecoverer) {
// do something
}
In the above bean config am able to check only value of foo.test.aplpha=sodium, but how to add foo.test.beta=chlorine matching in the above config ?