728x90
반응형
아래 한줄을 추가하면 됨
restTemplate.getMessageConverters().add(0, new StringHttpMessageConverter(StandardCharsets.UTF_8)); // 한글깨짐방지
RestTemplate restTemplate = new RestTemplate();
restTemplate.getMessageConverters().add(0, new StringHttpMessageConverter(StandardCharsets.UTF_8)); // 한글깨짐방지
ResponseEntity<String> responseEntity = restTemplate.postForEntity(uri, requestEntity, String.class);
String tossReceivedData = responseEntity.getBody().trim();
https://sowon-dev.github.io/2023/01/12/230113spring-resttemplateutf8/
[Spring]RestTemplate response 한글깨짐 UTF-8적용하기
최근에 Gson 한글 깨지는 현상을 해결한 블로그 글 Gson 한글이 ?로 깨져보일때을 포스팅했었다.성공메시지는 한글이라 몰랐는데 에러메시지가 엉망진창으로 인코딩되서 출력되었다.나는 한글을
sowon-dev.github.io
728x90
반응형
'IT > Spring Boot' 카테고리의 다른 글
스프링 배치 Spring Quartz + job scheduler 이해하기 좋은글 (0) | 2023.06.05 |
---|---|
eclipse에서 라이브러리 추가후 maven 업데이트 꼭!!! (0) | 2023.05.17 |
Intellij - Spring Boot Configuration Annotation Processor not configured (0) | 2023.04.20 |
JPA Propagation과 Isolation 이해하기 (0) | 2023.04.18 |
인텔리제이 spring MVC 프로젝트 (0) | 2023.04.12 |
댓글