|
@@ -0,0 +1,33 @@
|
|
|
+package cn.com.qmth.examcloud.core.basic.client.impl;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.web.client.RestTemplate;
|
|
|
+
|
|
|
+import cn.com.qmth.examcloud.core.basic.client.DemoClient;
|
|
|
+import cn.com.qmth.examcloud.core.basic.domain.request.GetXxxReq;
|
|
|
+import cn.com.qmth.examcloud.core.basic.domain.response.GetXxxResp;
|
|
|
+
|
|
|
+
|
|
|
+ * 机构客户端
|
|
|
+ *
|
|
|
+ * @author WANG
|
|
|
+ *
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class DemoClientImpl implements DemoClient {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ RestTemplate restTemplate;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public GetXxxResp getXxx(GetXxxReq req) {
|
|
|
+ ResponseEntity<GetXxxResp> respEntity = restTemplate.getForEntity("http://ExamCloud-service-core/demo/getXxx",
|
|
|
+ GetXxxResp.class);
|
|
|
+ GetXxxResp resp = respEntity.getBody();
|
|
|
+ System.out.println(resp);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|