spring boot

requestMapping result 한글이 깨지는 문제 해결방법

카리스마유 2017. 4. 19. 16:50

@RequestMapping  resultType 이 java.lang.String 인 경우 한글이 return 될때 한글이 깨지는 경우가 있다.

이때는 아래와 같은 방법으로 해결할수 있다.



  @RequestMapping(method = { RequestMethod.GET }, 

value = "/", produces="text/plain;charset=UTF-8")