时间信息实现
由于每次访问都有获取token,所以就写了一个工具类
String getToken(String xh,String pwd) 获取token值
import net.sf.json.JSONObject;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import java.io.IOException;
import java.net.URISyntaxException;
public class Data {
public String getToken(String xh,String pwd) throws URISyntaxException, IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
URIBuilder uriBuilder = new URIBuilder("http://zswxyjw.minghuaetc.com/znlykjdxswxy/app.do");