I create a user manually via db(mysql). Now I want to encrypt the password for this user.How do I do this? Currently this is how I have acheived it.
1. Create a user in db with cleartext password
2. in my code while server startup, I check if password is cleartext then i encrypt it using bcrypt.
3. in spring-security.xml i have added bcrypt bean to decrypt it.
But using this approach I have to restart the server each time I add a new user. Any other way to do this? Using spring 4