Closed
Description
Summary
Tried expanding the Spring Security framework with a new Method level annotation, however, baked in classes and programmatic bean creation prevents this.
Actual Behavior
Replace PrePostAnnotationSecurityMetadataSource with a child bean is impossible without code repeating and unnecessary overriding, because of the original PrePostAnnotationSecurityMetadataSource class is baked into the code in GlobalMethodSecurityBeanDefinitionParser, where the bean is instantiated.
Expected Behavior
The implementation of MethodSecurityMetadataSource should be received from the BeanRegistry, instead of being baked into the code
Configuration
// Irrelevant
Version
spring-boot-starter-security:2.1.0.BUILD-SNAPSHOT -> 5.1.0.BUILD-SNAPSHOT