SpringBoot缓存技术整合Ehcache
首先说明一下,这里使用的是Springboot2.2.6.RELEASE版本,由于Springboot迭代很快,所以要注意版本问题。 1、SpringBoot整合Ehcache,修改pom文件,添加缓存支持启动器,和Ehcache缓存依赖jar包。 1 <?xml version= " 1.0 " encoding= " UTF-8 " ?> 2 <project xmlns= " http://maven.apache.org/POM/4.0.0 " xmlns:xsi= " http://www.w3.org/2001/XMLSchema-instance " 3 xsi:schemaLocation= " http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd " > 4 <modelVersion> 4.0 . 0 </modelVersion> 5 <parent> 6 <groupId>org.springframework.boot</groupId> 7 <artifactId>spring-boot-starter-parent</artifactId> 8 <version> 2.2 . 6 .RELEASE</version> 9 <relativePath/