I am integrating Spring session using redis and spring security. I am able to integrate it and removed all the errors which I faced.
But as per the requirement I am not able to get the SESSION attribute in cookie.
I am integrating it with my web application using xml and annotations.
The redis is installed on Windows.
Here is the code:
With the above configuration, the application is running. Even on console it prints activity related to spring session and redis but it is not showing any SESSION attribute in cookie as well as on the redis where there is no key store related to it.
Can somebody help me to figure out what am I missing?
I found the solution.
I missed the configuration which helps spring security to create and wire up a filter in front of all security infrastructure to look for active sessions and populate the security context from values stored in Redis.
I need to add a class.
After adding this, everything is working as expected.
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad: