With Spring Boot CLI is possible do the following:
spring encodepassword secret
Where that command prints
{bcrypt}$2a$10$ZjFpL