public class MyTest {
protected Jedis jedis; public MyTest() { // TODO Auto-generated constructor stub } @Before public void setUp() throws Exception { jedis = new Jedis("10.1.2.12", 6379, 500); jedis.connect(); jedis.auth("foobared"); jedis.configSet("timeout", "300"); jedis.flushAll(); jedis.set("foo", "bar"); String str = jedis.get("foo"); System.out.print(str); //System.out.print(0x24|0x12); }public void tearDown() { jedis.disconnect(); } /** * args */ public static void main(String[] args) { MyTest test = new MyTest(); try { test.setUp(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }// Jedis jedis = new Jedis("10.1.2.12", 6379);// jedis.auth("foobared");// Long l = jedis.dbSize();// System.out.println(String.valueOf(l));
}
}