public class

UsernameNotFoundException

extends AuthenticationException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ org.springframework.security.core.AuthenticationException
           ↳ org.springframework.security.core.userdetails.UsernameNotFoundException

Class Overview

Thrown if an UserDetailsService implementation cannot locate a User by its username.

Summary

Public Constructors
UsernameNotFoundException(String msg)
Constructs a UsernameNotFoundException with the specified message.
UsernameNotFoundException(String msg, Object extraInformation)
Constructs a UsernameNotFoundException, making use of the extraInformation property of the superclass.
UsernameNotFoundException(String msg, Throwable t)
Constructs a UsernameNotFoundException with the specified message and root cause.
[Expand]
Inherited Methods
From class org.springframework.security.core.AuthenticationException
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public UsernameNotFoundException (String msg)

Constructs a UsernameNotFoundException with the specified message.

Parameters
msg the detail message.

public UsernameNotFoundException (String msg, Object extraInformation)

Constructs a UsernameNotFoundException, making use of the extraInformation property of the superclass.

Parameters
msg the detail message
extraInformation additional information such as the username.

public UsernameNotFoundException (String msg, Throwable t)

Constructs a UsernameNotFoundException with the specified message and root cause.

Parameters
msg the detail message.
t root cause