Class AccessDeniedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.security.access.AccessDeniedException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AuthorizationServiceException, CsrfException, CsrfException

public class AccessDeniedException extends RuntimeException
Thrown if an Authentication object does not hold a required authority.
See Also:
  • Constructor Details

    • AccessDeniedException

      public AccessDeniedException(String msg)
      Constructs an AccessDeniedException with the specified message.
      Parameters:
      msg - the detail message
    • AccessDeniedException

      public AccessDeniedException(String msg, Throwable cause)
      Constructs an AccessDeniedException with the specified message and root cause.
      Parameters:
      msg - the detail message
      cause - root cause