修复端口号不能正常替换的bug

This commit is contained in:
zayac 2023-09-30 00:52:50 +08:00
parent 615b40e1b0
commit cdcec317b9

View File

@ -24,8 +24,8 @@ import java.util.List;
@Slf4j
@Service
public class ChangeUrlServiceImpl implements ChangeUrlService {
private static final String KYJS = "ky.js";
private static final String HTHJS = "template";
private static final String KYJS = "/www/wwwroot/cdn.static.cdcseo.com/js/ky.js";
private static final String HTHJS = "/www/wwwroot/cdn.static.cdcseo.com/js/hth.js";
@Override
public Boolean change(String text) {
@ -46,7 +46,7 @@ public class ChangeUrlServiceImpl implements ChangeUrlService {
"kyPc2",
"kyH51",
"kyH52",
"ky.js.template",
"/www/wwwroot/cdn.static.cdcseo.com/js/ky.js.template",
kyTargets);
//读取模板文件
String template = loadTemplate(kyTemplate.getTemplatePath());
@ -69,7 +69,7 @@ public class ChangeUrlServiceImpl implements ChangeUrlService {
HthMsgEntity hthMsg = new HthMsgEntity(arr);
List<String> hthTargets = new ArrayList<>();
hthTargets.add(HTHJS);
HthTemplateEntity hthTemplate = new HthTemplateEntity("hthApp", "hthtyApp", "hthPc", "hthH5", "hth.js.template", hthTargets);
HthTemplateEntity hthTemplate = new HthTemplateEntity("hthApp", "hthtyApp", "hthPc", "hthH5", "/www/wwwroot/cdn.static.cdcseo.com/js/hth.js.template", hthTargets);
//读取模板文件
String template = loadTemplate(hthTemplate.getTemplatePath());
template = template