The following code is returning null:
AController.java
private MyAppUser getMyAppUser(HttpSession session) {
MyAppUser myAppUser = (MyAppUser) session.getAttribute("myAppUserManager");
return myAppUser;
}
I also have tried this:
AController.java
@Autowired
MyAppUser myAppUser;
Despite the fact that I have the following in my context:
<bean id="myAppUserManager" class="com.myapp.profile.MyAppUser" scope="session"/>
This doesn't make any sense to me, the "myAppUser" bean is a bean that absolutely can never be null, and I need to be able to reference it from controllers, I don't need it in services or repositories, just controllers, but it doesn't seem to be getting stored in the session, the use case is extremely simple, but I haven't been able to get to the bottom of what's wrong, or come up with a good workaround