You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DestructionCallbackBindingListener on SessionScoped Beans not called #3415
Description
When a @SessionScope bean contains a method annotated with @PreDestroy, the method is not called when using either JdkSerializationRedisSerializer or GenericJackson2JsonRedisSerializer.
Behavior with different serializers:
JdkSerializationRedisSerializer:
The @PreDestroy method is not called, but no errors occur.
GenericJackson2JsonRedisSerializer:
A SerializationException is thrown by org.springframework.data.redis.serializer.
To Reproduce
A @SessionScope bean with a method annotated with @PreDestroy is present and in use.
Expected Behavior
The method annotated with @PreDestroy should be invoked when the bean is destroyed, regardless of the serializer used.
Activity