During development i find my self often having to restart my application which in turn results in an extra step of login in manually.
I thought i could add the method call springSercurityService.reauthenticate(‘myuser’) in the bootstrap however i am not sucessfull
Doing the same thing in a controller after the application is started works fine so its is just in the bootstrap that it does not work.
I debugged the code without seeing any obvious errors.
I hit the same issue and how I solved it was to use a bookmarklet (or a custom browser “search engine”) that makes it really easy to log back in. With deep linking enabled, it makes it very easy to continue working on the same page. After rebooting the server, just refresh the page and it will redirect you to the login page. Just activate the bookmarklet (or “search engine”) and it’ll log you in and redirect you back to the page you were working on.
I have a detailed blog post that shows how to get this set up.