影像资料链接外网转内网改为配置型(生产环境与外网隔离,需通过前置机)
This commit is contained in:
parent
bf3ffadd3d
commit
d449114ed8
@ -4,6 +4,7 @@ import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.ample.icms.query.ImageInfo;
|
||||
import com.ample.icms.util.GetInfoUtil;
|
||||
import com.ample.icms.util.PropertiesUtil;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentHelper;
|
||||
import org.dom4j.Element;
|
||||
@ -60,8 +61,13 @@ public class ImageInfoService {
|
||||
Element page = (Element) root.selectSingleNode("//PAGE[@PAGEID='"+pageId+"']");
|
||||
String pageUrl = page.attributeValue("PAGE_URL");
|
||||
|
||||
pageUrl ="http://172.28.1.59:5051/" + pageUrl.substring(33);
|
||||
System.out.println("OCR文件路径:"+pageUrl);
|
||||
//生产环境没有直接链接外网,需要通过前置机跳转,返回的图片链接是外网地址,所以需要替换
|
||||
if(PropertiesUtil.get("page_switch_url").length()>0){
|
||||
java.net.URL url = new java.net.URL(pageUrl);
|
||||
String replaceStr = url.getProtocol()+"://"+url.getAuthority();
|
||||
pageUrl = pageUrl.replace(replaceStr,PropertiesUtil.get("page_switch_url"));
|
||||
}
|
||||
System.out.println("文件路径:"+pageUrl);
|
||||
return pageUrl;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user