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