본문 바로가기
Study Hard/Java /스프링 문제해결

Caused by: java.util.MissingResourceException: Can't find bundle for base name application, locale ko_KR [ResourceBundle.getBundle("{path}")]

by 코플+ 2024. 8. 14.

Caused by: java.util.MissingResourceException: Can't find bundle for base name application, locale ko_KR
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1581)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
at gov.mfds.lms_client.WebApiService.<clinit>(WebApiService.java:24)

 

 

 

MissingResourceException 원인

.properties 파일 경로를 찾지 못할 때 에러 Locale을 찾는다.

 

 

 

ResourceBundle.getBundle("{path}") 경로는 resources 폴더 부터이다.

 

 

example

ResourceBundle.getBundle("application");

=> resource/application.properties

 

참고 - https://rollbar.com/blog/java-missingresourceexception/

댓글