ehcache報錯ERROR n.s.e.store.disk.DiskStorageFactory - Disk Write的解決辦法


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"
    />

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM