Cause:
Reason:
With
DEBUGGER +
Doc Spring Framework Reference Documentation 4.0.4.RELEASE
4.5 Bean scopes
Scoped beans as dependencies
If you use DEBUGGER AND set a break at below line
then examine
You will see it's an already created DI PROXY. SessionInfo$$EnhancerBySpringCGLIB
When you have below line, the session is just a plain object SessionInfo. It's NOT a PROXY
>>> When you're in HomeController, you still the PROXY
but the value you set was for session = new Session( editor );
So session.isLoggedIn() give false which is NORMAL. This comes from the PROXY.
Solution:
Since you already have an injected Proxy in LoginController, you can set the values (setters)