I integrated redis with spring session and spring security 5.5.4 and respected the

An error has occurred Could not read JSON: The class with org.springframework.security.web.savedrequest.DefaultSavedRequest and name of org.springframework.security.web.savedrequest.DefaultSavedRequest is not in the allowlist. If you believe this class is safe to deserialize, please provide an explicit mapping using Jackson annotations or by providing a Mixin. If the serialization is only done by a trusted source, you can also enable default typing. See https://github.com/spring-projects/spring-security/issues/4370 for details; nested exception is java.lang.IllegalArgumentException: The class with org.springframework.security.web.savedrequest.DefaultSavedRequest and name of org.springframework.security.web.savedrequest.DefaultSavedRequest is not in the allowlist. If you believe this class is safe to deserialize, please provide an explicit mapping using Jackson annotations or by providing a Mixin. If the serialization is only done by a trusted source, you can also enable default typing. See https://github.com/spring-projects/spring-security/issues/4370 for details

The same issue as : https://github.com/spring-projects/spring-security/issues/8373

Comment From: jzheaux

Thanks for getting in touch, @TeamOussama! It feels like this is a question that would be better suited to Stack Overflow. We prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add more detail if you feel this is a genuine bug.