File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed
spring-context-support/src
main/java/org/springframework/cache/ehcache
test/java/org/springframework/cache/jcache Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ configure(allprojects) { project ->
33
33
ext. ehcachejcacheVersion = " 1.0.1"
34
34
ext. fileuploadVersion = " 1.3.1"
35
35
ext. freemarkerVersion = " 2.3.22"
36
- ext. groovyVersion = " 2.4.2 "
36
+ ext. groovyVersion = " 2.4.3 "
37
37
ext. gsonVersion = " 2.3.1"
38
38
ext. hibernate3Version = " 3.6.10.Final"
39
39
ext. hibernate4Version = " 4.3.8.Final"
@@ -647,8 +647,9 @@ project("spring-context-support") {
647
647
testCompile(" commons-digester:commons-digester:1.8.1" ) // for Velocity/JasperReports
648
648
testCompile(" org.hsqldb:hsqldb:${ hsqldbVersion} " )
649
649
testCompile(" org.slf4j:slf4j-api:${ slf4jVersion} " )
650
- testCompile(" org.ehcache:jcache:${ ehcachejcacheVersion} " )
651
650
testRuntime(" com.sun.mail:javax.mail:1.5.2" )
651
+ testCompile(" org.ehcache:jcache:${ ehcachejcacheVersion} " )
652
+ // testCompile("org.ehcache:ehcache:3.0.0.m1") // alternative to ehcache-jcache above
652
653
}
653
654
}
654
655
Original file line number Diff line number Diff line change 1
1
/**
2
2
* Support classes for the open source cache
3
- * <a href="http://ehcache.sourceforge.net">EhCache</a>,
3
+ * <a href="http://ehcache.sourceforge.net">EhCache 2.x </a>,
4
4
* allowing to set up an EhCache CacheManager and Caches
5
5
* as beans in a Spring context.
6
+ *
7
+ * <p>Note: EhCache 3.x lives in a different package namespace
8
+ * and is not covered by the traditional support classes here.
9
+ * Instead, consider using it through JCache (JSR-107), with
10
+ * Spring's support in {@link org.springframework.cache.jcache}.
6
11
*/
7
12
package org .springframework .cache .ehcache ;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2014 the original author or authors.
2
+ * Copyright 2002-2015 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
20
20
import javax .cache .Caching ;
21
21
import javax .cache .configuration .MutableConfiguration ;
22
22
23
- import org .ehcache .jcache .JCacheConfiguration ;
24
23
import org .junit .After ;
25
24
import org .junit .Ignore ;
26
25
import org .junit .Test ;
@@ -82,9 +81,9 @@ public CacheManager jCacheManager() {
82
81
CacheManager cacheManager = Caching .getCachingProvider ().getCacheManager ();
83
82
MutableConfiguration <Object , Object > mutableConfiguration = new MutableConfiguration <Object , Object >();
84
83
mutableConfiguration .setStoreByValue (false ); // otherwise value has to be Serializable
85
- cacheManager .createCache ("testCache" , new JCacheConfiguration < Object , Object >( mutableConfiguration ) );
86
- cacheManager .createCache ("primary" , new JCacheConfiguration < Object , Object >( mutableConfiguration ) );
87
- cacheManager .createCache ("secondary" , new JCacheConfiguration < Object , Object >( mutableConfiguration ) );
84
+ cacheManager .createCache ("testCache" , mutableConfiguration );
85
+ cacheManager .createCache ("primary" , mutableConfiguration );
86
+ cacheManager .createCache ("secondary" , mutableConfiguration );
88
87
return cacheManager ;
89
88
}
90
89
You can’t perform that action at this time.
0 commit comments