Describe the bug In the method-security document, the Enabling Certain Annotations, should use AuthorizationManagerAfterMethodInterceptor.

@Configuration
@EnableMethodSecurity(prePostEnabled = false)
class MethodSecurityConfig {
    @Bean
    @Role(BeanDefinition.ROLE_INFRASTRUCTURE)
    Advisor postAuthorize() {
        return AuthorizationManagerBeforeMethodInterceptor.postAuthorize();
    }
}

To Reproduce Steps to reproduce the behavior.

Expected behavior A clear and concise description of what you expected to happen.

Sample

A link to a GitHub repository with a minimal, reproducible sample.

Reports that include a sample will take priority over reports that do not. Spring Security spring-security/docs/modules/ROOT/pages/servlet/authorization /method-security

At times, we may require a sample, so it is good to try and include a sample up front.

Comment From: sjohnr

@douxiaofeng99 thanks for the report. Would you like to submit a PR to fix the docs?

Comment From: douxiaofeng99

summited a PR to fix the docs