×
- 코드 및 콘솔 화면은 [ code ] 내용 [ /code ] 태그 처리하여 주세요.
- 강조하고자 하는 내용은 [ b ] 내용 [ /b ] 태그 처리하여 주세요.
- 강조하고자 하는 내용은 [ b ] 내용 [ /b ] 태그 처리하여 주세요.
Spring 메세지 파일 설정 시 ... for locale 'ko_KR' 오류
-
helloworld
(stdio.h) - 이 글의 작성자
- Offline
- Junior
덜보기
더보기
- Posts: 117
- Thank you received: 24
06 Feb 2016 14:30 - 06 Feb 2016 14:45 #517
작성자: helloworld
helloworld 님의 글: Spring 메세지 파일 설정 시 ... for locale 'ko_KR' 오류
메세지 파일을 만들고 설정도 잘 한거 같은데 아래처럼 문제가 생깁니다.
이래저래 검색을 해보니 messages_es.properties, messages_de.properties 처럼 언어별로 메세지 파일을 만들어야 하는 것 같은데 정말 그게 맞는지.. 그냥 message.properties 파일 하나로 다 처리할수 있게 못하는지 알고 싶네요. 참고로 설정은 아래와 같구요.
javax.servlet.ServletException: javax.servlet.jsp.JspTagException: No message found under code 'label.name' for locale 'ko_KR'.
이래저래 검색을 해보니 messages_es.properties, messages_de.properties 처럼 언어별로 메세지 파일을 만들어야 하는 것 같은데 정말 그게 맞는지.. 그냥 message.properties 파일 하나로 다 처리할수 있게 못하는지 알고 싶네요. 참고로 설정은 아래와 같구요.
<beans:bean id="messageSource"
class="org.springframework.context.support.ResourceBundleMessageSource
<beans:property name="basenames">
<beans:list>
<beans:value>message.label</beans:value>
</beans:list>
</beans:property>
</beans:bean>
-
helloworld
(stdio.h) - 이 글의 작성자
- Offline
- Junior
덜보기
더보기
- Posts: 117
- Thank you received: 24
06 Feb 2016 14:45 - 06 Sep 2017 01:51 #518
작성자: helloworld
helloworld 님의 답글: Spring 메세지 파일 설정 시 ... for locale 'ko_KR' 오류
자문 자답입니다. 실수를 했네요.
1. message 폴더의 label.properties를 만들었고
2. label.properties 파일 안에 name이라는 key를 만들었고
3. view에서 label.name이라는 key를 사용한게 원인.
view에서 label.name -> name으로 수정하여 잘 해결되었네요. 다만 message 파일을 UTF-8로 저장했는데도 한글이 깨지는데 뭘더 보면 될지, 도움을 요청합니다!!
1. message 폴더의 label.properties를 만들었고
2. label.properties 파일 안에 name이라는 key를 만들었고
3. view에서 label.name이라는 key를 사용한게 원인.
view에서 label.name -> name으로 수정하여 잘 해결되었네요. 다만 message 파일을 UTF-8로 저장했는데도 한글이 깨지는데 뭘더 보면 될지, 도움을 요청합니다!!
-
intersection3
(동교동삼거리) - Offline
- ★ Tech Writer ★
덜보기
더보기
- Posts: 127
- Thank you received: 19
06 Feb 2016 15:55 #520
작성자: intersection3
intersection3 님의 답글: Spring 메세지 파일 설정 시 ... for locale 'ko_KR' 오류
1. class 변경
org.springframework.context.support.ResourceBundleMessageSource
-> org.springframework.context.support.ReloadableResourceBundleMessageSource
2. defaultEncoding property 추가
<beans:property name="defaultEncoding" value="UTF-8" />
org.springframework.context.support.ResourceBundleMessageSource
-> org.springframework.context.support.ReloadableResourceBundleMessageSource
2. defaultEncoding property 추가
<beans:property name="defaultEncoding" value="UTF-8" />
Time to create page: 0.057 seconds
- 현재 위치:
- 홈
- Forum
- 메인 게시판
- Question and Answer
- Spring 메세지 파일 설정 시 ... for locale 'ko_KR' 오류