|
@@ -38,6 +38,9 @@ import java.util.List;
|
|
|
@RequestMapping("device")
|
|
|
@Api(tags = "设备管理")
|
|
|
public class DeviceController {
|
|
|
+
|
|
|
+ private RestTemplate restTemplate = new RestTemplate();
|
|
|
+
|
|
|
@Autowired
|
|
|
private DeviceService deviceService;
|
|
|
|
|
@@ -131,8 +134,6 @@ public class DeviceController {
|
|
|
HttpServletRequest httpServletRequest,
|
|
|
HttpServletResponse httpServletResponse
|
|
|
) throws URISyntaxException, IOException {
|
|
|
- //http://114.135.61.188:58088/api/device/getData
|
|
|
- RestTemplate restTemplate=new RestTemplate();
|
|
|
URI uri = new URI("http", null, server, port, httpServletRequest.getRequestURI(), httpServletRequest.getQueryString(), null);
|
|
|
ResponseEntity<String> responseEntity = restTemplate.exchange(uri, HttpMethod.GET, null, String.class);
|
|
|
|
|
@@ -157,7 +158,6 @@ public class DeviceController {
|
|
|
HttpServletRequest httpServletRequest,
|
|
|
HttpServletResponse httpServletResponse
|
|
|
) throws URISyntaxException, IOException {
|
|
|
- RestTemplate restTemplate=new RestTemplate();
|
|
|
URI uri = new URI("http", null, server, port, httpServletRequest.getRequestURI(), httpServletRequest.getQueryString(), null);
|
|
|
ResponseEntity<byte[]> responseEntity = restTemplate.exchange(uri, HttpMethod.GET, null, byte[].class);
|
|
|
|