Commit abbcc7eb by Johannes Edmeier

Update samples to set defaultTargetUrl on successHandler

parent d062ce13
...@@ -64,6 +64,7 @@ public class SpringBootAdminApplication { ...@@ -64,6 +64,7 @@ public class SpringBootAdminApplication {
// @formatter:off // @formatter:off
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
successHandler.setTargetUrlParameter("redirectTo"); successHandler.setTargetUrlParameter("redirectTo");
successHandler.setDefaultTargetUrl(adminContextPath + "/");
http.authorizeRequests() http.authorizeRequests()
.antMatchers(adminContextPath + "/assets/**").permitAll() .antMatchers(adminContextPath + "/assets/**").permitAll()
......
...@@ -67,6 +67,7 @@ public class SpringBootAdminApplication { ...@@ -67,6 +67,7 @@ public class SpringBootAdminApplication {
// @formatter:off // @formatter:off
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
successHandler.setTargetUrlParameter("redirectTo"); successHandler.setTargetUrlParameter("redirectTo");
successHandler.setDefaultTargetUrl(adminContextPath + "/");
http.authorizeRequests() http.authorizeRequests()
.antMatchers(adminContextPath + "/assets/**").permitAll() .antMatchers(adminContextPath + "/assets/**").permitAll()
......
...@@ -75,6 +75,7 @@ public class SpringBootAdminApplication { ...@@ -75,6 +75,7 @@ public class SpringBootAdminApplication {
// @formatter:off // @formatter:off
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
successHandler.setTargetUrlParameter("redirectTo"); successHandler.setTargetUrlParameter("redirectTo");
successHandler.setDefaultTargetUrl(adminContextPath + "/");
http.authorizeRequests() http.authorizeRequests()
.antMatchers(adminContextPath + "/assets/**").permitAll() .antMatchers(adminContextPath + "/assets/**").permitAll()
......
...@@ -85,6 +85,7 @@ public class SpringBootAdminApplication { ...@@ -85,6 +85,7 @@ public class SpringBootAdminApplication {
// @formatter:off // @formatter:off
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
successHandler.setTargetUrlParameter("redirectTo"); successHandler.setTargetUrlParameter("redirectTo");
successHandler.setDefaultTargetUrl(adminContextPath + "/");
http.authorizeRequests() http.authorizeRequests()
.antMatchers(adminContextPath + "/assets/**").permitAll() // <1> .antMatchers(adminContextPath + "/assets/**").permitAll() // <1>
......
...@@ -69,6 +69,7 @@ public class SpringBootAdminApplication extends SpringBootServletInitializer { ...@@ -69,6 +69,7 @@ public class SpringBootAdminApplication extends SpringBootServletInitializer {
// @formatter:off // @formatter:off
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
successHandler.setTargetUrlParameter("redirectTo"); successHandler.setTargetUrlParameter("redirectTo");
successHandler.setDefaultTargetUrl(adminContextPath + "/");
http.authorizeRequests() http.authorizeRequests()
.antMatchers(adminContextPath + "/assets/**").permitAll() .antMatchers(adminContextPath + "/assets/**").permitAll()
......
...@@ -63,6 +63,7 @@ public class SpringBootAdminApplication { ...@@ -63,6 +63,7 @@ public class SpringBootAdminApplication {
// @formatter:off // @formatter:off
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
successHandler.setTargetUrlParameter("redirectTo"); successHandler.setTargetUrlParameter("redirectTo");
successHandler.setDefaultTargetUrl(adminContextPath + "/");
http.authorizeRequests() http.authorizeRequests()
.antMatchers(adminContextPath + "/assets/**").permitAll() .antMatchers(adminContextPath + "/assets/**").permitAll()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment