I'm an asp.net developer and I'm now working on a Spring MVC webproject.
I want to write a helper class that allows me to get the current User or check if a user is logged in, something like that.
In asp.net I could create a class anywhere in my project and for accessing the current session for a request I could write HttpContext.Current.Session["CurrentUser"]
.
What is the way to do this in Spring MVC?
I found this Blogpost, saying that this is not possible (here). But I also found this stackoverflow post, where the method of getting the current session looked pretty similar to the asp.net way (here). It didn't work for me though.