ehcache的maven配置:
<!-- ehcache的jar --> <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache</artifactId> <version>2.8.0</version> </dependency>
ehcache的配置文件:
<?xml version="1.0" encoding="UTF-8"?> <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../bin/ehcache.xsd"> <defaultCache overflowToDisk="true" eternal="false" maxElementsInMemory="1"/> <diskStore path="D:/develop/cache" /> </ehcache>