I'm new to redis and trying to integrate it with java spring.
I've a session scoped @Configuration class which has multiple @Autowired variables. These variables include some of the classes like java.sql.DataSource (which are not serializable) and other custom classes.
As I'm storing spring session in redis, I'm not able to store this Configuration class in redis as it is giving me serialization errors.
What I've found is every session scoped bean is added to session attributes and every session attribute is stored in redis via serialization.
Can somebody please suggest me an approach to store this class in redis ??
OR
Is there a way to not include these session scoped beans as session attributes and hence, restrict them from getting stored in redis.
If I mark these Autowired variables as transient, It comes as null when the object is deserialized.
Thanks in advance,
Rishabh