Hi Guys,
I have created an index view (IndexView.java) which is the root view. Now I have a login page that it would redirect to dashboard view (DashboardView.java) after logging in. The problem is that whenever I log in, it redirects to my index view. I have added the http.formLogin configuration in my security config. Please see my codes below.
@Override protected void configure(HttpSecurity http) throws Exception { http.authorizeHttpRequests(authorizationManagerRequestMatcherRegistry -> { authorizationManagerRequestMatcherRegistry.requestMatchers(new AntPathRequestMatcher("/images/**"), new AntPathRequestMatcher("/index-layout.css")).permitAll(); }); http.formLogin(httpSecurityFormLoginConfigurer -> { httpSecurityFormLoginConfigurer.loginPage(LOGIN_URL) .successForwardUrl(SUCCESS_LOGIN_URL) .permitAll(); }); super.configure(http); this.setLoginView(http, LoginView.class); }