获取网络时间
@PostMapping("/getTime")
public ResponseData getTime() throws IOException {
String webUrl = "http://www.baidu.com";
URL url=new URL(webUrl);
URLConnection conn=url.openConnection();
conn.connect();
long dateL=conn.getDate();
Date date=new Date(dateL);
SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String times = dateFormat.format(date);
return ResponseData.handleSuccess(times);
}