Spring security does account locking based on database

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.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e43d43-44a74.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e43d43-44a74.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?