增加路径测试接口
This commit is contained in:
@@ -26,6 +26,7 @@ import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -189,6 +190,17 @@ public class ReportManageConroller {
|
||||
stringRedisTemplate.boundValueOps("1121212").set("1212");
|
||||
|
||||
}
|
||||
@ApiOperation("testPath")
|
||||
@GetMapping("/testPath")
|
||||
public ResponseMessage testPath() throws URISyntaxException {
|
||||
HashMap<String, String> pathMap = new HashMap<>();
|
||||
String jarPath = new File(getClass().getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParentFile().getPath();
|
||||
String property = System.getProperty("user.dir");
|
||||
pathMap.put("jarpath", jarPath);
|
||||
pathMap.put("propertyPath", property);
|
||||
return Result.success(pathMap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user