ehcache报错ERROR n.s.e.store.disk.DiskStorageFactory

23:53:44 ERROR n.s.e.store.disk.DiskStorageFactory - Disk Write of com.koal.**.**.**.**.**.***Impl$$EnhancerBySpringCGLIB$$5b782dcf.query****.2063333947 failed: 
java.io.NotSerializableException: com.koal.**.**.entity.**.helloDO

  看图很明显,其中问题就是helloDO没有序列化。因为ehcache开启了缓存存储到物理影片上,所以需要序列化对象,否则就报错。

    <cache name="**-**-MethodsCache"
           maxElementsInMemory="10000"
           eternal="false"
           timeToIdleSeconds="1800"
           timeToLiveSeconds="3600"
           memoryStoreEvictionPolicy="LFU"
           overflowToDisk="true"
           maxElementsOnDisk="10000000"
           diskPersistent="false"
           diskExpiryThreadIntervalSeconds="120"
    />

  

原文地址:https://www.cnblogs.com/koal/p/6006217.html