增加路径测试接口

This commit is contained in:
2023-04-28 09:10:23 +08:00
parent 78bfd21522
commit ebd2750533
2 changed files with 36 additions and 24 deletions
@@ -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);
}
/**