浏览代码

rmi api test.

deason 6 年之前
父节点
当前提交
7bf7dbb1d7

+ 3 - 1
examcloud-core-print-starter/src/main/resources/logback-spring.xml

@@ -44,12 +44,14 @@
         <appender-ref ref="STDOUT"/>
     </logger>
 
-    <logger name="com.netflix.discovery" level="WARN"/>
     <logger name="org.springframework.jdbc.core.JdbcTemplate" level="DEBUG"/>
     <logger name="org.springframework.data.mongodb" level="DEBUG"/>
     <logger name="org.springframework" level="WARN"/>
     <logger name="org.hibernate" level="WARN"/>
     <logger name="org.apache" level="WARN"/>
+    <logger name="com.netflix.discovery" level="WARN"/>
+    <logger name="springfox.documentation.spring.web" level="WARN"/>
+    <logger name="cn.com.qmth.examcloud.commons" level="INFO"/>
 
     <root level="DEBUG">
         <appender-ref ref="DEBUG_APPENDER"/>

+ 5 - 1
examcloud-core-print-starter/src/main/resources/security-exclusions.conf

@@ -1,7 +1,11 @@
 [][/][GET]
+[][/doc.html][GET]
 [][/swagger/ui/index][GET]
 [/swagger-resources][][GET]
 [/swagger-resources][/configuration/ui][GET]
 [/swagger-resources][/configuration/security][GET]
 [][${springfox.documentation.swagger.v2.path:/v2/api-docs}][GET]
-[][/doc.html][GET]
+[${server.error.path:${error.path:/error}}][][POST]
+
+[${$rmp.cloud.print}/printing/project][/sync][POST]
+[${$rmp.ctrl.print}/printing/project][/list][POST]

+ 37 - 0
examcloud-core-print-starter/src/test/java/cn/com/qmth/examcloud/core/print/test/RedisServiceTest.java

@@ -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);
+    }
+
+}