Describe the bug

Current version 6.1.0 When I use the composite annotation to include @EnableMethodSecurity, similar to @Component in @Service, the method org.springframework.security.config.annotation.method.configuration.MethodSecuritySelector#selectImports returns an empty array

but the first It is caused by an if judgment, but the code after the if returns a valid value

But in the latest code , see MethodSecuritySelector.java

if (!importMetadata.hasAnnotation(EnableMethodSecurity.class.getName())
            && !importMetadata.hasMetaAnnotation(EnableMethodSecurity.class.getName())) {
        return new String[0];
}

Since it is an and relationship, the first condition is still valid, and it is hoped that it will become an or relationship, or the second condition can also be used

Expected behavior I wish I could include @EnableMethodSecurity support for composite annotations

Comment From: marcusdacoregio

Hi @xiaoyu72, the meta-annotation support for @EnableMethodSecurity has been added via this PR. It will be available in Spring Security 6.2, you can try the SNAPSHOT version if you want to take a peek.