SafeDeserializationRepository is a class that I extended from SessionRepository. I'd like Redis to use this class rather than its SessionRepository. How can I implement it?
class SafeDeserializationRepository<S : Session?>( private val delegate: SessionRepository<S>, private val redisTemplate: RedisTemplate<Any, Any>) : SessionRepository<S> { override fun createSession(): S { return delegate.createSession() } override fun save(session: S) { delegate.save(session) } override fun findById(p0: String?): S? { return try { delegate.findById(p0) } catch (e: Exception) { println("Deleting non-deserializable session with key $p0") redisTemplate.delete(BOUNDED_HASH_KEY_PREFIX + p0) null } } override fun deleteById(p0: String?) { delegate.deleteById(p0) } companion object { private const val BOUNDED_HASH_KEY_PREFIX = "spring:session:sessions:" }}