Annotation Type EnableGlobalMethodSecurity
-
@Retention(RUNTIME) @Target(TYPE) @Documented @Import(org.springframework.security.config.annotation.method.configuration.GlobalMethodSecuritySelector.class) @EnableGlobalAuthentication @Configuration public @interface EnableGlobalMethodSecurity
Enables Spring Security global method security similar to the <global-method-security> xml support.
More advanced configurations may wish to extend
GlobalMethodSecurityConfigurationand override the protected methods to provide custom implementations. Note thatEnableGlobalMethodSecuritystill must be included on the class extendingGlobalMethodSecurityConfigurationto determine the settings.- Since:
- 3.2
-
-
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.intorderIndicate the ordering of the execution of the security advisor when multiple advices are applied at a specific joinpoint.booleanprePostEnabledDetermines if Spring Security's pre post annotations should be enabled.booleanproxyTargetClassIndicate whether subclass-based (CGLIB) proxies are to be created (true) as opposed to standard Java interface-based proxies (false).booleansecuredEnabledDetermines if Spring Security'sSecuredannotations should be enabled.
-
-
-
-
proxyTargetClass
boolean proxyTargetClass
Indicate whether subclass-based (CGLIB) proxies are to be created (true) as opposed to standard Java interface-based proxies (false). 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 the Security annotations. 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 CGILIB proxies should be created instead of interface based proxies, else false
- Default:
- false
-
-