Co-exclude UserDetailsServiceAutoConfiguration where SecurityAutoConfiguration is excluded

Proprietary

Spring Boot 4.0 decoupled SecurityAutoConfiguration and UserDetailsServiceAutoConfiguration: only SecurityAutoConfiguration registers the SecurityProperties bean that UserDetailsServiceAutoConfiguration consumes, so an application that excludes only the former fails at startup. This recipe co-excludes UserDetailsServiceAutoConfiguration for both exclusion styles - the exclude / excludeAutoConfiguration annotation attributes and the spring.autoconfigure.exclude property/YAML setting. It is intended to run while the sources are still on the Spring Boot 3 namespace, before the Spring Boot 4.0 modular-starter package relocation, and it is idempotent.

io.moderne.java.spring.boot4.AddUserDetailsServiceAutoConfigurationExclusion
mod run . --recipe=io.moderne.java.spring.boot4.AddUserDetailsServiceAutoConfigurationExclusion

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. Co-exclude UserDetailsServiceAutoConfiguration on auto-configuration exclusion annotations
  2. Co-exclude UserDetailsServiceAutoConfiguration in spring.autoconfigure.exclude