How do I redirect UsernameNotFoundException to a page?
if ( user == null ) {
log.info( "Email " + email + " não é um ususário cadastrado." );
throw new UsernameNotFoundException( "Email " + email + " não é um ususário cadastrado." );
}
I think I was not very clear on my question, Spring returns an error page, with the following message:
Whitelabel Error Page
This application has no explicit mapping for / error, so you are seeing this as a fallback.
Mon Jul 31 15:20:43 BRT 2017 There was an unexpected error (type = Forbidden, status = 403). Access Denied
I would like the error message to be defined through an HTML page I created.
I'm using AngularJS with Spring, how do I map it?