• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

NoSuchMessageException이 뜹니다..

20.01.17 00:03 작성 조회수 301

0

며칠째 원인을 모르겠어서 이렇게 질문 드립니다.

[프로젝트 폴더 구조]

프로젝트 구조

[ 소스코드 ]

@Component
public class AppRunner implements ApplicationRunner {

	@Autowired
	MessageSource messageSource;
	
	@Override
	public void run(ApplicationArguments args) throws Exception {
		System.out.println(messageSource.getClass());
		System.out.println(messageSource.getMessage("code", new String[] {"yj"} , Locale.KOREA));
	}

}

[ messages_ko_KR.properties ]

code = hi {0}

messageSource의 클래스를 찍어봤을 때는  DelegatingMessageSource로 찍힙니다.

[ getMessage() 메서드 호출시 발생하는 예외 ]

왜 동작을 안하는 걸까요.. 

답변 1

답변을 작성해보세요.

0

흠.. 해당 프로젝트를 깃헙에 올리고 URL 공유해주시면 한번 살펴볼께요.