Target:
First we have to fix the issues when we meet mistake not direct to the default page just direct a friendly page
Second when we want to leave we have to logout the account what we already login, in that way we can keep our account saved.
What you need:
aboout error: As we all know the springboot will search the folders what you already set but the fact that is the name of the folders what you set is a key action.
about logout: what we need to do is add some specific code on the commons.html What's next we have add a method on the LoginController class.
The details:
At the very begining, let's solve out the error problem. So I will some you three photoswhich is one secuss and two failure.
The First Situation is you not set a second folder!!!!!.
so that is the default error page.
The Second Situation is you set a second folder but the name is not called error!!!!!.
As you can see I have already put the 404.html into the hello folder.
The Third Situation is right.
Now let's sovle the second problem how to logout our account.
In here we just need to set our session state become invalidate model. and then we will success to logout.