diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/SecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/SecurityConfig.java index 955b3bb214..06357650dc 100644 --- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/SecurityConfig.java +++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/SecurityConfig.java @@ -16,11 +16,14 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { protected void configure(final HttpSecurity http) throws Exception { http.csrf() .disable() - .authorizeRequests().anyRequest().authenticated() + .authorizeRequests() + .anyRequest() + .authenticated() .and() - .formLogin().permitAll(); + .formLogin() + .permitAll(); } - + @Bean public PasswordEncoder encoder() { return new BCryptPasswordEncoder(11);