This is my SecurityConfig
@Configuration
@EnableGlobalMethodSecurity ( securedEnabled = true )
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
public void configureAuth(AuthenticationManagerBuilder auth) throws Exception{
auth
.inMemoryAuthentication()
.withUser("tom")
.password("password")
.roles("ADMIN")
.and()
.withUser("user")
.password("password")
.roles("USER");
}}
Even though I define in memory users I can't log in using them and I get a generated user password everytime I run the application and I'm pretty sure that, that isn't supposed to be happening.
I've tried the solutions that were posted here with no luck at all.
Application.properties has nothing changed in it and main application class is this default with no changes.