Skip to content

spring-security/docs/modules/ROOT/pages/servlet/authorization /method-security #15045

Closed
@douxiaofeng99

Description

@douxiaofeng99

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.
image

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

Metadata

Metadata

Assignees

Labels

in: docsAn issue in Documentation or samplestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions