Spring boot默认使用的是SimpleCacheConfiguration,即使用ConcurrentMapCacheManager来实现缓存。但是要切换到其他缓存实现也很简单
pom文件
在pom中引入相应的jar包
org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-data-jpa mysql mysql-connector-java org.apache.commons commons-dbcp2 org.springframework.boot spring-boot-starter-cache net.sf.ehcache ehcache