|
@@ -0,0 +1,37 @@
|
|
|
+/*
|
|
|
+ * *************************************************
|
|
|
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
|
|
|
+ * Created by Deason on 2018-10-25 10:56:16.
|
|
|
+ * *************************************************
|
|
|
+ */
|
|
|
+
|
|
|
+package cn.com.qmth.examcloud.core.print.test;
|
|
|
+
|
|
|
+import cn.com.qmth.examcloud.core.print.PrintApplication;
|
|
|
+import org.junit.Test;
|
|
|
+import org.junit.runner.RunWith;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.boot.test.context.SpringBootTest;
|
|
|
+import org.springframework.data.redis.core.RedisTemplate;
|
|
|
+import org.springframework.test.context.junit4.SpringRunner;
|
|
|
+
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author: fengdesheng
|
|
|
+ * @since: 2018/10/25
|
|
|
+ */
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+@SpringBootTest(classes = PrintApplication.class)
|
|
|
+public class RedisServiceTest {
|
|
|
+ @Autowired
|
|
|
+ private RedisTemplate<String, Object> redisTemplate;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void initTraceTest() throws Exception {
|
|
|
+ String redisKey = String.format("$_RMI_:%s", "ae3a094eb5e94ab391f53bf0f671dc78");
|
|
|
+ redisTemplate.opsForValue().set(redisKey, System.currentTimeMillis(), 5L, TimeUnit.MINUTES);
|
|
|
+ System.out.println(redisKey);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|