Annotation Type EnableMethodSecurity
-
@Retention(RUNTIME) @Target(TYPE) @Documented @Import(org.springframework.security.config.annotation.method.configuration.MethodSecuritySelector.class) @Configuration public @interface EnableMethodSecurityEnables Spring Security Method Security.- Since:
- 5.6
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanjsr250EnabledDetermines if JSR-250 annotations should be enabled.org.springframework.context.annotation.AdviceModemodeIndicate how security advice should be applied.booleanprePostEnabledDetermines if Spring Security'sPreAuthorize,PostAuthorize,PreFilter, andPostFilterannotations should be enabled.booleanproxyTargetClassIndicate whether subclass-based (CGLIB) proxies are to be created as opposed to standard Java interface-based proxies.booleansecuredEnabledDetermines if Spring Security'sSecuredannotation should be enabled.
-
-
-
-
proxyTargetClass
boolean proxyTargetClass
Indicate whether subclass-based (CGLIB) proxies are to be created as opposed to standard Java interface-based proxies. The default isfalse. Applicable only ifmode()is set toAdviceMode.PROXY.Note that setting this attribute to
truewill affect all Spring-managed beans requiring proxying, not just those marked with@Cacheable. For example, other beans marked with Spring's@Transactionalannotation will be upgraded to subclass proxying at the same time. This approach has no negative impact in practice unless one is explicitly expecting one type of proxy vs another, e.g. in tests.- Returns:
- true if subclass-based (CGLIB) proxies are to be created
- Default:
- false
-
-