Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 개발
- component
- 데이터베이스
- 개발공부
- mssql
- 자바
- 스프링부트
- DATABASE
- sql
- javascript
- 쿼리
- 컴포넌트
- EXTJS
- 자바스크립트
- Vue
- springboot
- React
- java
- jdk
- Intellij
- reactjs
- table
- 보안취약점
- GIT
- 스프링
- Spring
- 리액트
- restapi
- crud
- JS
Archives
- Today
- Total
준준의 기록일지
[Java] resourcebundle 클래스 경로가 아닌 파일경로에서 가져오기. 본문
"이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다."
private static ResourceBundle fromClassLoader(String dir, String bundleName) throws MalformedURLException {
File file = new File(dir);
URL[] urls = {file.toURI().toURL()};
ClassLoader loader = new URLClassLoader(urls);
// Properties file name = test.properties. The .properties extension is appended to bundle name
return ResourceBundle.getBundle(bundleName, Locale.getDefault(), loader);
}
gist.github.com/mobleyc/73f1a0036d9ef3fdc7ab