Spring Boot Security 4 custom PasswordEncoder
<p>I have a password field in the database containing MD5(username + password). How would I implement this in Spring Security + JdbcAuthentication. I know that this is not secure by any means, but it is a legacy database, which I must talk to. My current code looks like this:</p>

<pre><code>auth.jdbcAuthentication()
    .dataSource(dataSource)
    .usersByUsernameQuery("select login, password, 1 as enabled from 
                           login where login=?")
    .authoritiesByUsernameQuery("select login,role" +
                    "  from login lo" +
                    "  join login_role lor on lo.login_id = lor.login_id" +
                    "  join role gr on lor.role_id = gr.role_id" +
                    " where login=?")
</code></pre>

<p>If I send the hashed value as password the authentication works. I think I would have to configure some password encoder.</p>