Package org.springframework.security.authorization.method

# Annotation Interface HandleAuthorizationDenied

@Target({METHOD,TYPE}) @Retention(RUNTIME) @Inherited @Documented public @interface HandleAuthorizationDenied
Annotation for specifying handling behavior when an authorization denied happens in method security or an `AuthorizationDeniedException` is thrown during method invocation

Since:
  6.3
See Also:
  - `AuthorizationManagerAfterMethodInterceptor`
  - `AuthorizationManagerBeforeMethodInterceptor`

## Optional Element Summary

Optional Elements
Modifier and Type
Optional Element
Description
`Class<? extends MethodAuthorizationDeniedHandler>`
`handlerClass`
The `MethodAuthorizationDeniedHandler` used to handle denied authorization results

## Element Details

### handlerClass

Class<? extends MethodAuthorizationDeniedHandler> handlerClass
The `MethodAuthorizationDeniedHandler` used to handle denied authorization results

Returns:

Default:
  org.springframework.security.authorization.method.ThrowingMethodAuthorizationDeniedHandler.class