<anyframe:message...> 사용시..
Submitted by arbepr on 수, 09/01/2010 - 09:27
GEN 으로 생성한 디폴트 프로젝트에서 <anyframe:message...> 혹은 <fmt:message...> 를 이용하여
프로퍼티에 있는 내용을 가져옵니다.
헌데 프로퍼티 파일을 새로 만들면 <anyframe:message...>,<fmt:message...> 이 두개가 먹히지 않습니다.
근데 , <spring:message...>는 먹히더군요.
새로 만든 프로퍼티 파일에 대해서 anyframe, fmt 가 먹히지 않는 이유는 무엇일까요..
org.springframework.context.support.ResourceBundleMessageSource 빈에 새로만든 프로퍼티 물론 추가했구요..


Re: <anyframe:message...> 사용시..
Anyframe에서 제공하는 MessageTag는 Spring의 MessageTag를 확장하여 메시지를 write하는 부분에 대해서만 오버라이드하였기 때문에 Spring의 MessageTag에서 추가된 리소스 파일들을 인식한다면 그 기능들을 그대로 활용하는 Anyframe MessageTag 역시 동일하게 동작해야 하는 것이 맞을 것 같습니다.
다음은 Anyframe의 MessagesTag 클래스의 일부입니다.
public class MessagesTag extends MessageTag { // ... protected void writeMessage(String msg) throws IOException { // ... } }