|
|
@@ -11,6 +11,7 @@ import java.util.Map;
|
|
11
|
11
|
import javax.annotation.Resource;
|
|
12
|
12
|
|
|
13
|
13
|
import org.apache.commons.lang3.StringUtils;
|
|
|
14
|
+import org.springframework.beans.factory.annotation.Value;
|
|
14
|
15
|
import org.springframework.context.annotation.Bean;
|
|
15
|
16
|
import org.springframework.stereotype.Service;
|
|
16
|
17
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -53,10 +54,8 @@ public class UserInfoServiceImpl implements UserInfoService {
|
|
53
|
54
|
@Resource
|
|
54
|
55
|
private RestTemplate restTemplate;
|
|
55
|
56
|
|
|
56
|
|
- @Bean
|
|
57
|
|
- public RestTemplate restTemplate() {
|
|
58
|
|
- return new RestTemplate();
|
|
59
|
|
- }
|
|
|
57
|
+ @Value("${jsgjjsjUrl}")
|
|
|
58
|
+ private String jsgjjsjUrl;
|
|
60
|
59
|
|
|
61
|
60
|
|
|
62
|
61
|
@Override
|
|
|
@@ -377,7 +376,7 @@ public class UserInfoServiceImpl implements UserInfoService {
|
|
377
|
376
|
/**
|
|
378
|
377
|
* restTemplate调用
|
|
379
|
378
|
*/
|
|
380
|
|
- String url = "http://localhost:9022/recPublish/sendMessage";//
|
|
|
379
|
+ //String url = "http://localhost:9022/recPublish/sendMessage";//
|
|
381
|
380
|
// 发送post请求,并打印结果,以String类型接收响应结果JSON字符串
|
|
382
|
381
|
MultiValueMap<String, Object> sendMap = new LinkedMultiValueMap<>();
|
|
383
|
382
|
//Map<String, Object> sendMap = new HashMap<String, Object>();
|
|
|
@@ -393,7 +392,7 @@ public class UserInfoServiceImpl implements UserInfoService {
|
|
393
|
392
|
sendMap.add("tableName", tableName);
|
|
394
|
393
|
sendMap.add("orgId",orgId);
|
|
395
|
394
|
|
|
396
|
|
- String result = (String) restTemplate.postForObject(url, sendMap, String.class);
|
|
|
395
|
+ restTemplate.postForObject(jsgjjsjUrl, sendMap, String.class);
|
|
397
|
396
|
}
|
|
398
|
397
|
|
|
399
|
398
|
}
|