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()); } }