Migrate multi-condition @ConditionalOnBean annotations from Boot 1.x

MSAL

Migrate multi-condition @ConditionalOnBean annotations to use AnyNestedCondition when upgrading from Spring Boot 1.x to 2.x. In Boot 1.x, listing multiple beans in @ConditionalOnBean meant OR (any match); in Boot 2.x+ it means AND (all must match). This recipe preserves the original OR semantics by wrapping conditions in an AnyNestedCondition class.

org.openrewrite.java.spring.boot2.ConditionalOnBeanAnyNestedConditionBoot1
mod run . --recipe=org.openrewrite.java.spring.boot2.ConditionalOnBeanAnyNestedConditionBoot1

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Migrate multi-condition @ConditionalOnBean annotations