方式一: 通过 HttpServletRequest 获取
public Object login(User user, HttpServletRequest request){
//获取设备信息
String userAgent = request.getHeader("user-agent");
}
方式 二: 通过 @RequestHeader 获取
public Object login(User user, @RequestHeader("user-agent") String agent){
}