|  |  |  | 
|---|
|  |  |  | package com.dy.rtuMw.web.webRequest; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.contant.Constant; | 
|---|
|  |  |  | import com.dy.common.mw.protocol.Command; | 
|---|
|  |  |  | import com.dy.common.webUtil.BaseResponse; | 
|---|
|  |  |  | import com.dy.rtuMw.server.ServerProperties; | 
|---|
|  |  |  | import org.apache.logging.log4j.LogManager; | 
|---|
|  |  |  | import org.apache.logging.log4j.Logger; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | 
|---|
|  |  |  | restTemplate.getMessageConverters().set(1,new StringHttpMessageConverter(StandardCharsets.UTF_8)); | 
|---|
|  |  |  | HttpHeaders headers = new HttpHeaders(); | 
|---|
|  |  |  | headers.setContentType(MediaType.parseMediaType("application/json;charset=UTF-8")); | 
|---|
|  |  |  | headers.set(Constant.TokenKeyInHeader, ServerProperties.orgTag); | 
|---|
|  |  |  | HttpEntity<?> httpEntity = new HttpEntity<>(obj, headers); | 
|---|
|  |  |  | ResponseEntity<BaseResponse> response = null; | 
|---|
|  |  |  | try { | 
|---|