Right now Spring Security's Java Configuration provides a DSL that works around https://github.com/spring-projects/spring-framework/issues/18353

Now that it's been added, we should explore supporting a DSL that supports Bean registration. See https://github.com/spring-projects/spring-framework/issues/21497#issuecomment-2743159198 for an rough outline of what it might look like