|
|
@ -1,6 +1,7 @@
|
|
|
|
package com.weaver.seconddev.interfaces.iuroa;
|
|
|
|
package com.weaver.seconddev.interfaces.iuroa;
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
import com.weaver.seconddev.interfaces.prop.ConfigProp;
|
|
|
|
import org.apache.http.HttpResponse;
|
|
|
|
import org.apache.http.HttpResponse;
|
|
|
|
import org.apache.http.client.HttpClient;
|
|
|
|
import org.apache.http.client.HttpClient;
|
|
|
|
import org.apache.http.client.methods.HttpPost;
|
|
|
|
import org.apache.http.client.methods.HttpPost;
|
|
|
@ -13,9 +14,14 @@ import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import com.weaver.verupgrade.general.BaseBean;
|
|
|
|
import com.weaver.verupgrade.general.BaseBean;
|
|
|
|
import com.weaver.verupgrade.general.Util;
|
|
|
|
import com.weaver.verupgrade.general.Util;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Component
|
|
|
|
public class SyncDataService extends BaseBean {
|
|
|
|
public class SyncDataService extends BaseBean {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private ConfigProp configProp;
|
|
|
|
private static final org.slf4j.Logger logger_4014b7c4 = LoggerFactory.getLogger(SyncDataService.class);
|
|
|
|
private static final org.slf4j.Logger logger_4014b7c4 = LoggerFactory.getLogger(SyncDataService.class);
|
|
|
|
|
|
|
|
|
|
|
|
public String[] call(JSONObject data, String link) {
|
|
|
|
public String[] call(JSONObject data, String link) {
|
|
|
@ -24,7 +30,9 @@ public class SyncDataService extends BaseBean {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
HttpClient client = new DefaultHttpClient();
|
|
|
|
HttpClient client = new DefaultHttpClient();
|
|
|
|
// String url = Util.null2String(getPropValue("htiuroasync", link)).trim();
|
|
|
|
// String url = Util.null2String(getPropValue("htiuroasync", link)).trim();
|
|
|
|
String url = "";
|
|
|
|
|
|
|
|
|
|
|
|
String url = configProp.getSyncProject();
|
|
|
|
|
|
|
|
logger_4014b7c4.error(String.valueOf("url = " + url));
|
|
|
|
post = new HttpPost(url);
|
|
|
|
post = new HttpPost(url);
|
|
|
|
post.setHeader(HTTP.CONTENT_TYPE, "application/json; charset=UTF-8");
|
|
|
|
post.setHeader(HTTP.CONTENT_TYPE, "application/json; charset=UTF-8");
|
|
|
|
StringEntity entity = new StringEntity(data.toString(), "UTF-8");
|
|
|
|
StringEntity entity = new StringEntity(data.toString(), "UTF-8");
|
|
|
|