实体上的spring.jpa.properties.hibernate.cache.use_second_level_cache或@Cache更重要的是什么?我试图通过设置spring.jpa.properties.hibernate.cache.use_second_level_cache = false来禁用二级缓存(我的实体仍然使用@ cache注释),二级缓存仍然在工作.这是预期的行为吗?
发布于 2020-01-22 11:55:37
如果依赖项在类路径中,而且"use_second_level_cache“甚至是假的,Hibernate仍然使用一些"NoOp”区域提供程序,它仍然要求实体及其属性是可序列化的,
在关闭二级缓存之后,我仍然得到了NotSerializableException,这让我非常困惑。
https://stackoverflow.com/questions/59857101
复制相似问题