How can i reload the URL automatically if session is expired? <p>I am using maven spring boot and spring security with java configuration. I have also created Security Configuration which extends <code>WebSecurityConfigurerAdapter</code>. </p> <p>Here what i need is once my session is expired then automatically reload all the pages based on antMatchers. </p> <p><strong><em>Note</strong>: I am using <code>jquery</code> rest client with <code>@RestController</code> instead of jsp and servlet.</em></p>