1.ehcache.xml配置文件中需要设置如图所示,红标为重点

spring boot中使用ehcache将缓存保存到硬盘中注意的问题

2.缓存需要调用flush()方法

spring boot中使用ehcache将缓存保存到硬盘中注意的问题

3. 在项目运行之前设置属性或者在命令行设置属性:net.sf.ehcache.enableShutdownHook=true,

我则是启动类中设置属性

spring boot中使用ehcache将缓存保存到硬盘中注意的问题

相关文章:

  • 2021-09-16
  • 2021-09-01
  • 2021-07-09
  • 2021-08-14
  • 2022-12-23
  • 2021-10-31
  • 2022-12-23
  • 2021-07-22
猜你喜欢
  • 2021-09-15
  • 2021-11-27
  • 2021-11-26
  • 2021-09-03
  • 2022-12-23
  • 2021-05-28
相关资源
相似解决方案