Update WebSecurityConfig.java
This commit is contained in:
parent
4fb3cb2577
commit
0bbc9163f9
|
@ -18,16 +18,17 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
@Override
|
@Override
|
||||||
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||||
auth
|
auth
|
||||||
.userDetailsService(userDetailsService)
|
.userDetailsService(userDetailsService)
|
||||||
.passwordEncoder(new BCryptPasswordEncoder());
|
.passwordEncoder(new BCryptPasswordEncoder());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
http
|
http.authorizeRequests()
|
||||||
.authorizeRequests()
|
.antMatchers("/")
|
||||||
.antMatchers("/").permitAll()
|
.permitAll()
|
||||||
.anyRequest().authenticated()
|
.anyRequest()
|
||||||
|
.authenticated()
|
||||||
.and()
|
.and()
|
||||||
.formLogin();
|
.formLogin();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue