lin 3 years ago
parent
commit
c18c3cbdf1

+ 1 - 8
zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/controller/TestController.java

@@ -1,9 +1,6 @@
 package com.zcxk.rmcp.web.controller;
 package com.zcxk.rmcp.web.controller;
 
 
 import com.zcxk.core.common.pojo.AjaxMessage;
 import com.zcxk.core.common.pojo.AjaxMessage;
-import com.zcxk.rmcp.core.entity.Device;
-import com.zcxk.rmcp.web.service.DeviceService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
@@ -19,14 +16,10 @@ import org.springframework.web.bind.annotation.RestController;
 public class TestController {
 public class TestController {
 
 
 
 
-    @Autowired
-    DeviceService deviceService;
 
 
     @PostMapping("/test")
     @PostMapping("/test")
     public AjaxMessage<Void> test(){
     public AjaxMessage<Void> test(){
-        Device device = deviceService.findById(1L);
-        System.out.println(device);
-        return AjaxMessage.success();
+        return null;
     }
     }
 
 
 }
 }

+ 3 - 3
zoniot-rmcp/zoniot-rmcp-web/src/main/resources/logback-spring.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
 <configuration>
-    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
-    <property name="LOG_HOME" value="logs"/>
+    <springProperty scope="context" name="LOG_PATH" source="logging.path" defaultValue="/tmp" />
     <springProperty scope="context" name="APPLICATION_NAME" source="spring.application.name" defaultValue="default" />
     <springProperty scope="context" name="APPLICATION_NAME" source="spring.application.name" defaultValue="default" />
+    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
     <include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
     <include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
     <jmxConfigurator/>
     <jmxConfigurator/>
 
 
@@ -14,7 +14,7 @@
         </encoder>
         </encoder>
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
             <!-- rollover daily -->
             <!-- rollover daily -->
-            <fileNamePattern>${LOG_HOME}/${APPLICATION_NAME}-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <fileNamePattern>${LOG_PATH}/${APPLICATION_NAME}-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
             <!-- each file should be at most 100MB, keep 60 days worth of history, but at most 20GB -->
             <!-- each file should be at most 100MB, keep 60 days worth of history, but at most 20GB -->
             <maxFileSize>20MB</maxFileSize>
             <maxFileSize>20MB</maxFileSize>
             <maxHistory>60</maxHistory>
             <maxHistory>60</maxHistory>