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 | 31 |
Tags
- CEP
- Spring
- bootstrap jquery datepicker
- gwt
- SVN
- jenkins
- java tip
- spring security
- jstl
- gwt-ext
- Hudson
- custom filter
- JBoss Seam
- guvnor
- jquery serialize
- GEventEvaluator
- spring transaction
- maven
- spring jpa
- jquery
- rember me
- JPA
- Drools Fusion
- querydsl
- zabbix
- COC
- @SqlResultSetMapping
- MySQL
- drools
- ibatis
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");
}