文章目录 一、前期配置 二、添加 ehcache.xml 三、测试使用 一、前期配置 加入依赖: 从搜索到 maven 中找到 ehcache依赖库,加入pom 配置文件: <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache</a