read https://codeshelper.com/a/11.
written by codecraft. Here spring security will use InMemoryUserDetailsManager
to inject UserDetailsManager
by default. The problem is that InMemoryUserDetailsManager
lock will report UsernameNotFoundException
guess that because the user details are all in the database, the user details management in this memory will not have user information.
so how to modify the program to report LockedException
?
there is another problem with this article. After the number of failures exceeds the limit, the correct password can still log in successfully.