Implementing Database Authentication with Spring Security - Persisting Users with UserDetailsService and JdbcUserDetailsManager
This article explains the standard pattern for moving away from in-memory users and authenticating against users stored in your own users table. It covers, with code, how to write your own UserDetailsService, wire it into DaoAuthenticationProvider, use JdbcUserDetailsManager with the standard schema, register and verify passwords with BCrypt, and handle account disabling.