网址改为配置

This commit is contained in:
季圣华
2021-06-19 21:31:37 +08:00
parent dd90168359
commit b3510488ca
4 changed files with 30 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ public class PlatformConfigController {
* @param request
* @return
*/
@GetMapping(value = "/getPlatformName")
@GetMapping(value = "/getPlatform/name")
public String getPlatformName(HttpServletRequest request)throws Exception {
String res;
try {
@@ -46,6 +46,25 @@ public class PlatformConfigController {
return res;
}
/**
* 获取官方网站地址
* @param request
* @return
*/
@GetMapping(value = "/getPlatform/url")
public String getPlatformUrl(HttpServletRequest request)throws Exception {
String res;
try {
String platformKey = "platform_url";
PlatformConfig platformConfig = platformConfigService.getPlatformConfigByKey(platformKey);
res = platformConfig.getPlatformValue();
} catch(Exception e){
e.printStackTrace();
res = "#";
}
return res;
}
/**
* 根据platformKey更新platformValue
* @param object

View File

@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
initParams = {@WebInitParam(name = "ignoredUrl", value = ".ico"),
@WebInitParam(name = "filterPath",
value = "/jshERP-boot/user/login#/jshERP-boot/user/registerUser#/jshERP-boot/user/randomImage" +
"#/jshERP-boot/platformConfig/getPlatformName#/jshERP-boot/v2/api-docs#/jshERP-boot/webjars")})
"#/jshERP-boot/platformConfig/getPlatform#/jshERP-boot/v2/api-docs#/jshERP-boot/webjars")})
public class LogCostFilter implements Filter {
private static final String FILTER_PATH = "filterPath";