提交 fc5447fa authored 作者: yangli's avatar yangli

.

上级 9ff7f59a
...@@ -100,6 +100,7 @@ public class ApqRegisterApplication { ...@@ -100,6 +100,7 @@ public class ApqRegisterApplication {
// 上报黑名单异常 // 上报黑名单异常
if (mapRequest.size() > 0) { if (mapRequest.size() > 0) {
Map eventMapRequest = new HashMap(); Map eventMapRequest = new HashMap();
eventMapRequest.put("requestId", 1);
eventMapRequest.put("methodName", "BlackList"); eventMapRequest.put("methodName", "BlackList");
eventMapRequest.put("params", mapRequest); eventMapRequest.put("params", mapRequest);
Map map = restTemplate.postForObject("http://localhost:8765/uplink_event/oc-client", eventMapRequest, Map.class); Map map = restTemplate.postForObject("http://localhost:8765/uplink_event/oc-client", eventMapRequest, Map.class);
......
...@@ -31,4 +31,19 @@ public class RestTest { ...@@ -31,4 +31,19 @@ public class RestTest {
Map map = restTemplate.postForObject("http://localhost:8765/uplink/oc-client", mapRequest, Map.class); Map map = restTemplate.postForObject("http://localhost:8765/uplink/oc-client", mapRequest, Map.class);
System.out.println(map); System.out.println(map);
} }
@Test
public void test2() {
Map mapRequest = new HashMap();
mapRequest.put("abc", "1");
Map eventMapRequest = new HashMap();
eventMapRequest.put("requestId", 1);
eventMapRequest.put("methodName", "BlackList");
eventMapRequest.put("params", mapRequest);
Map map = restTemplate.postForObject("http://localhost:8765/uplink_event/oc-client", eventMapRequest, Map.class);
System.out.println("................");
System.out.println(map);
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论