借助url用mysql存储数据
但由于两个需要的参数不一样
想了半天还是重写一个方法分开调用
public class thing2 implements Runnable{
private String money;
private String nali;
private String temp;
private List<thing> thingList;
public String getMoney() {
return money;
}
public void set(String money, String nali){
this.money = money;
this.nali = nali;
}
public void setMoney(String money) {
this.money = money;
}
public void setNali(String nali) {
this.nali = nali;
}
public void setTemp(String temp) {
this.temp = temp;
}
public String getNali() {
return nali;
}
public String getTemp() {
return temp;
}
public List<thing> getThingList() {
return thingList;
}
public void setThingList(List<thing> thingList) {
this.thingList = thingList;
}
@Override
public void run() {
webs web = new webs();
temp = web.executeHttpGet2();
thingList= JSON.parseObject(temp,new TypeReference<List<thing>>(){});
}
}