Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
Tags
- jenkins
- java tip
- ibatis
- Hudson
- maven
- gwt
- MySQL
- JBoss Seam
- COC
- spring security
- jstl
- spring jpa
- Drools Fusion
- gwt-ext
- CEP
- spring transaction
- @SqlResultSetMapping
- guvnor
- SVN
- GEventEvaluator
- bootstrap jquery datepicker
- JPA
- zabbix
- Spring
- jquery serialize
- querydsl
- rember me
- jquery
- drools
- custom filter
Archives
- Today
- Total
봉 블로그
properties 읽고 값 가져오기. 본문
직접 FileInputStream 을 이용할경우 jar 파일 안에 있는 프로퍼티 파일을 읽을때 에러가 난다.
private String getDbUsername()throws IOException{
Properties props = PropertiesLoaderUtils.loadAllProperties("property/"+System.getProperty("server.mode")+"/default.jdbc.properties");
return props.getProperty("jdbc.username");
}
private String getDbUsername()throws IOException{
Properties props = PropertiesLoaderUtils.loadAllProperties("property/"+System.getProperty("server.mode")+"/default.jdbc.properties");
return props.getProperty("jdbc.username");
}