在方法中接收请求头当中的信息
<%@ page contentType="text/html;charset=UTF-8" language="java" isErrorPage="true" %>
<html>
<head>
<title>@RequestMapping相关属性</title>
</head>
<body>
<a href="https://www.ctyun.cn/portal/link.html?target=%24%7BpageContext.request.contextPath%7D%2FtestHeader.action">提交请求</a>
</body>
</html>
/**
* @author: BNTang
*/
public class MyFirstController {
("testHeader")
public String show( ("Referer") String referer, ("Host") String host) {
System.out.println(referer);
System.out.println(host);
return "/first";
}
}