this is sample project of spring-data-redis + caching. I'd like to store caches in redis in plain json, so I've configured GenericJackson2JsonRedisSerializer with objectMapper provided by spring.
Currently when I run test (the only one in application) I'm getting following error:
java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class com.github.bilakpoc.rediscachedemo.generated.model.ModelImport (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; com.github.bilakpoc.rediscachedemo.generated.model.ModelImport is in unnamed module of loader 'app')
at com.github.bilakpoc.rediscachedemo.service.ImportService$$EnhancerBySpringCGLIB$$14512ec6.getImportById(<generated>) ~[classes/:na]
Please can anybody share how to properly configure redis to store caches in json?
Thanks