Trying to use SpringSession with Redis storage together with my Vaadin App running under SpringBoot. Session works fine with SpringBoot controllers in my app. But when displaying VaadinUI, even a simple one without any @Autowired beans etc, (example below), I'm getting the following error.
org.springframework.data.redis.serializer.SerializationException: Cannot serialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to serialize object using DefaultSerializer; nested exception is java.io.NotSerializableException: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext
I found similar post here NotSerializableException on serialization of objects currently shown by Vaadin but solution doesnt work for me. I found even this Vaadin ticket https://dev.vaadin.com/ticket/19462 but @SerializableProxy has no efect in the simple UI below as there is no @Autowired bean here and error is still there. Any idea how to resolve this? Database (Redis, memcached etc. ) session storage is very important for load balanced solution we try to build.
@SpringUI(path="/simple")
public class SimpleUI extends UI implements Serializable {
private static final long serialVersionUID = 1L;
@Override
protected void init(VaadinRequest request) {
}
}