Spring Security Login System
I am building login system using spring security but everytime I login and try to access anonther page, it just redirects me to the Login.html. private UsernamePasswordAuthenticationToken authentication; snippet of my post mapping /logged method: authentication = new UsernamePasswordAuthenticationToken(accountModel, null); SecurityContextHolder.getContext().setAuthentication(authentication); and this is SecurityConfiguration class: import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import