注意:
1)orderUrl是经过参数注入进来的,在项目中添加web-ysdt.properties 文件
web-ysdt.properties文件配置以下:
ysdt.url=${ysdt.url}
ysdt.orderUrl=${ysdt.orderUrl}
ysdt.account=${ysdt.account}
ysdt.accountToKen=${ysdt.accountToKen}
在pom.xml文件中配置路劲参数以下:
<profiles>
<profile>
<properties>
<ysdt.url>http://app.zhongjincloud.com:21002/ysdt-web/ssl/external/queryRiskInfo.htm</ysdt.url>
<ysdt.orderUrl>http://app.zhongjincloud.com:21002/ysdt-web/external/order/toOrderChart.htm</ysdt.orderUrl>
<ysdt.account>18846161556</ysdt.account> <ysdt.accountToKen>bTk2M20yMm1jNDlteWdkY29rbWU0NDI3NjhkODBlYTdiMzQ4NzYw1510731393293</ysdt.accountToKen>
</properties>
</profile>
</profiles>
在service中使用以下:
@Value("${ysdt.orderUrl}")
private String orderUrl;//订单查询路径
页面以下:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
%>
<%
String url = (String)request.getAttribute("iframeUrl");
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit">
<meta name="Keywords" Content="">
<meta name="Description" Content="">
<link rel="shortcut icon" href="<%=path%>/resources/images/favicon.ico" type="image/x-icon" />
<link type="text/css" rel="stylesheet" href="<%=path%>/resources/css/css.css" />
<script type="text/javascript" src="<%=path%>/resources/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="<%=path%>/resources/js/main.js"></script>
<title>海贝岛-产业金融信息服务平台</title>
</head>
<body style="background:#f2f2f2;" >
<div>
<div ><jsp:include page="../header.jsp" /></div>
//头部
<div class="w1200 tcenter" >
<iframe id="iframe1"
src="<%=url%>"
width="100%" height="1500px" style="margin-top:120px" frameborder="no" border="0" ></iframe>
</div>
<jsp:include page="../footer.jsp" />
//尾部
</div>
</body>
</html>