도담도담

다국어 설정시 자동변환이 안될 때 본문

IT 공부/Spring Framework

다국어 설정시 자동변환이 안될 때

Zinisang 2021. 6. 28. 16:11

다국어 설정을 위해서는 

 

 

위와 같이 properties 와 txt 파일을 생성한 후, 

txt 파일에서 작성한 후에 복사해서 properties 파일에 붙여넣는다.

이런식으로 복사, 붙여넣기를 하면 자동으로 변화되어 주어야 한다.


 

다국어 설정시 properties 쪽에서 자동변환 설정이 되지 않을 시,

 

C:\Program Files\Java\jdk1.8.0_251\bin 로 가서 navtive2ascii.exe 파일을 찾아간다.

 

해당 파일을 찾았으면 

native2ascii.exe –encoding UTF-8 messageSource_ko.properties messageSource_ko.properties 

와 같이 실행 시킨 후 해당 파일을 message 패키지에 넣어 주시면 된다.

 



native2ascii.exe 사용방법

https://docs.oracle.com/javase/7/docs/technotes/tools/solaris/native2ascii.html 

사이트를 참조

'IT 공부 > Spring Framework' 카테고리의 다른 글

myBatis 기본설정 및 리소스 구조  (0) 2021.06.29
MyBatis 인스톨하기  (0) 2021.06.28
AOP 기본개념 틀  (0) 2021.06.27
Annotation @ 정의  (0) 2021.06.25
스프링 설정파일 (applicationContext)  (0) 2021.06.16
Comments