|
@ -13,6 +13,7 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer |
|
|
import org.springframework.context.annotation.Bean; |
|
|
import org.springframework.context.annotation.Bean; |
|
|
import org.springframework.security.crypto.factory.PasswordEncoderFactories; |
|
|
import org.springframework.security.crypto.factory.PasswordEncoderFactories; |
|
|
import org.springframework.security.crypto.password.PasswordEncoder; |
|
|
import org.springframework.security.crypto.password.PasswordEncoder; |
|
|
|
|
|
import org.thymeleaf.templateresolver.UrlTemplateResolver; |
|
|
|
|
|
|
|
|
import com.fjordtek.bookstore.model.auth.Role; |
|
|
import com.fjordtek.bookstore.model.auth.Role; |
|
|
import com.fjordtek.bookstore.model.auth.RoleRepository; |
|
|
import com.fjordtek.bookstore.model.auth.RoleRepository; |
|
@ -49,6 +50,14 @@ public class BookstoreApplication extends SpringBootServletInitializer { |
|
|
SpringApplication.run(BookstoreApplication.class, args); |
|
|
SpringApplication.run(BookstoreApplication.class, args); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
|
|
public UrlTemplateResolver urlTemplateResolver() { |
|
|
|
|
|
UrlTemplateResolver urlTemplateResolver = new UrlTemplateResolver(); |
|
|
|
|
|
urlTemplateResolver.setCacheable(true); |
|
|
|
|
|
urlTemplateResolver.getCharacterEncoding(); |
|
|
|
|
|
return urlTemplateResolver; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Bean |
|
|
@Bean |
|
|
public CommandLineRunner userDatabaseRunner( |
|
|
public CommandLineRunner userDatabaseRunner( |
|
|
UserRepository userRepository, |
|
|
UserRepository userRepository, |
|
|