diff --git a/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/java/sample/web/secure/custom/SampleWebSecureCustomApplication.java b/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/java/sample/web/secure/custom/SampleWebSecureCustomApplication.java index 469e3bc59c..6fbf9dd61e 100644 --- a/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/java/sample/web/secure/custom/SampleWebSecureCustomApplication.java +++ b/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/java/sample/web/secure/custom/SampleWebSecureCustomApplication.java @@ -76,7 +76,7 @@ public class SampleWebSecureCustomApplication extends WebMvcConfigurerAdapter { protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests().antMatchers("/css/**").permitAll().anyRequest() .fullyAuthenticated().and().formLogin().loginPage("/login") - .failureUrl("/login?error").permitAll(); + .failureUrl("/login?error").permitAll().and().logout().permitAll(); } @Override diff --git a/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/resources/templates/home.html b/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/resources/templates/home.html index 6fa69dc027..024fee0209 100644 --- a/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/resources/templates/home.html +++ b/spring-boot-samples/spring-boot-sample-web-secure-custom/src/main/resources/templates/home.html @@ -13,7 +13,6 @@ Plain
@@ -21,6 +20,9 @@