Annotation Interface EnableReactiveMethodSecurity
@Retention(RUNTIME)
@Target(TYPE)
@Documented
@Import(org.springframework.security.config.annotation.method.configuration.ReactiveMethodSecuritySelector.class)
public @interface EnableReactiveMethodSecurity
- Since:
- 5.0
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionorg.springframework.context.annotation.AdviceMode
Indicate how security advice should be applied.int
Indicate the ordering of the execution of the security advisor when multiple advices are applied at a specific joinpoint.boolean
Indicate whether subclass-based (CGLIB) proxies are to be created as opposed to standard Java interface-based proxies.boolean
Indicate whetherReactiveAuthorizationManager
based Method Security to be used.
-
Element Details
-
proxyTargetClass
boolean proxyTargetClassIndicate 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
true
will affect all Spring-managed beans requiring proxying, not just those marked with@Cacheable
. For example, other beans marked with Spring's@Transactional
annotation 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.- Default:
- false
-
mode
org.springframework.context.annotation.AdviceMode modeIndicate how security advice should be applied. The default isAdviceMode.PROXY
.- Returns:
- the
AdviceMode
to use - See Also:
-
AdviceMode
- Default:
- PROXY
-
order
int orderIndicate the ordering of the execution of the security advisor when multiple advices are applied at a specific joinpoint. The default isOrdered.LOWEST_PRECEDENCE
.- Returns:
- the order the security advisor should be applied
- Default:
- 2147483647
-
useAuthorizationManager
boolean useAuthorizationManagerIndicate whetherReactiveAuthorizationManager
based Method Security to be used.- Since:
- 5.8
- Default:
- true
-