From 58e1b057981ad9c89a189f0ee3133781bf8f92a9 Mon Sep 17 00:00:00 2001 From: shuzheng <469741414@qq.com> Date: Tue, 18 Oct 2016 17:32:46 +0800 Subject: [PATCH] =?UTF-8?q?service=20test=E5=8E=BB=E6=8E=89ehcache?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zheng/cms/service/UserServiceTest.java | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/cms/cms-service/src/test/java/com/zheng/cms/service/UserServiceTest.java b/cms/cms-service/src/test/java/com/zheng/cms/service/UserServiceTest.java index 8152a25d..5e5578b6 100644 --- a/cms/cms-service/src/test/java/com/zheng/cms/service/UserServiceTest.java +++ b/cms/cms-service/src/test/java/com/zheng/cms/service/UserServiceTest.java @@ -20,8 +20,7 @@ import org.springframework.test.context.transaction.TransactionConfiguration; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration({ "classpath:applicationContext.xml", - "classpath:applicationContext-jdbc.xml", - "classpath:applicationContext-ehcache.xml" + "classpath:applicationContext-jdbc.xml" }) @TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) public class UserServiceTest { @@ -37,22 +36,6 @@ public class UserServiceTest { // 自动生成接口调用 User user = userService.getMapper().selectByPrimaryKey(1); System.out.println(null == user ? "null" :user.getNickname()); - - // EhCache调用 - // Create a cache manager - final CacheManager cacheManager = CacheManager.getInstance(); - // create the cache called "hello-world" - final Cache cache = cacheManager.getCache("ehcache_common"); - // create a key to map the data to - final String key = "key"; - // Create a data element - final Element element = new Element(key, "value"); - // Put the element into the data store - cache.put(element); - // Retrieve the data element - final Element cacheElement = cache.get(key); - // Print the value - System.out.println(cacheElement.getObjectValue()); } }