I have a little problem with Spring Boot. I really like Spring Boot, it\'s very convinient tool, which allow me to focus on logic implementation instead of beans configurati
It seems that Spring Boot loads my custom Spring Securty config, but it doesn't use it.
You did not configure your AuthenticationManager correctly. You should use @Autowired:
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception{
auth.inMemoryAuthentication().withUser("user").password("password").roles("USER");
}
You can read more on spring security documentation here. Also, make sure that your configuration is going to be picked up by spring boot. You can read more about standard project structure in spring boot here and its security integration here.
Update Based on the stacktrace:
Caused by: java.lang.IllegalArgumentException: ROLE_USER cannot start with ROLE_
You should drop the ROLE_ prefix in roles("ROLE_USER"), Just use roles("USER").