Selaa lähdekoodia

service test去掉ehcache测试

shuzheng 9 vuotta sitten
vanhempi
sitoutus
58e1b05798

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