develog

properties 본문

Dev/Java

properties

냐옴 2013. 6. 26. 16:30

public void testProps() throws Exception {

    Properties props = new Properties();

    props.load(new FileInputStream("src/db.properties"));

    

    Set set = props.keySet();

    Iterator iter = set.iterator();

    while (iter.hasNext()) {

        String key = (String) iter.next();

        System.out.println(key + " : " + props.getProperty(key));

    }

}

'Dev > Java' 카테고리의 다른 글

spring pointcut expression syntax  (0) 2013.06.27
enum  (0) 2013.06.26
String.valueOf(), String.toString()  (0) 2013.06.25
현재 클래스 경로 구하기  (0) 2013.06.19
URLConnection vs HTTPClient  (0) 2013.06.19
Comments