diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/BookstoreApplication.java b/bookstore/src/main/java/com/fjordtek/bookstore/BookstoreApplication.java index c7ff5a6..9314bff 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/BookstoreApplication.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/BookstoreApplication.java @@ -14,6 +14,7 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Profile; import org.springframework.core.env.Environment; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.factory.PasswordEncoderFactories; import org.springframework.security.crypto.password.PasswordEncoder; import org.thymeleaf.templateresolver.UrlTemplateResolver; @@ -78,7 +79,7 @@ public class BookstoreApplication extends SpringBootServletInitializer { return (args) -> { - PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder(); + PasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); commonLogger.info("Add new roles to the database"); Role adminAR = new Role(env.getProperty("auth.authority.admin"));