spring 3.0 json한글처리
2017. 9. 1. 14:21ㆍ자바
반응형
@RequestMapping(value = "")
public ResponseEntity<String> convert() throws Exception {
// 응답헤더 지정
HttpHeaders httpheaders = new HttpHeaders();
httpheaders.add("Content-Type", "application/json;charset=UTF-8");
// Json 결과값 : {"name": "이름","age": 18}
String json = "{\"name\": \"이름\",\"age\": 18}" ;
return new ResponseEntity<String>(json, httpheaders, HttpStatus.CREATED) ;
}
'자바' 카테고리의 다른 글
tomcat link folder (0) | 2018.09.18 |
---|---|
android 인터넷 통신 설정(AndroidManifest.xml) (0) | 2017.09.27 |
ibatis '#'예약어 처리 방법 (0) | 2017.09.12 |
Map 데이터 추출 (0) | 2016.09.13 |
개발노트 (0) | 2016.08.24 |