标签:res XML pat location .class pen enc dep cti
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>4.3.12.RELEASE</version> </dependency>
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring/applicationContext.xml"})
public class BaseJunit4Test {
}
public class RedisTest extends BaseJunit4Test{
@Resource
private SpringRedis springRedis;
@Test
public void testRedisSentinel(){
String key = "test";
springRedis.set(key, "111");
String value = springRedis.get(key);
System.out.println(value);
}
}
标签:res XML pat location .class pen enc dep cti
原文地址:https://www.cnblogs.com/wslook/p/9161627.html