增加日志查询错误提示
This commit is contained in:
@@ -3,7 +3,12 @@ package com.nis.web.test;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
@@ -12,8 +17,28 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.log.NtcIpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("test")
|
||||
public class LogTest {
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("logTest")
|
||||
public String testservice(HttpServletRequest request) {
|
||||
String recv = "";
|
||||
try {
|
||||
String path = request.getClass().getClassLoader().getResource("").getPath();
|
||||
recv = FileUtil.readAsString(new File(path + "com/nis/web/test/logTest.txt"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
Thread.sleep(61000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
String readAsString = FileUtil.readAsString(new File("d:/test/logTest.txt"));
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"serverPort":"8080",
|
||||
"clientPort":"8080",
|
||||
"serviceType":10,
|
||||
"entranceId":112,
|
||||
"entranceId":21,
|
||||
"deviceId":2,
|
||||
"direction":1,
|
||||
"streamType":0,
|
||||
|
||||
Reference in New Issue
Block a user