Properties

public Properties getPropValue() {

Properties prop = new Properties();
try {
// prop.load(new FileInputStream(new ConstantsValue().PROPERTIES_PATH));
String filename = "config.properties";

// prop.load(getClass().getClassLoader().getResourceAsStream(filename)); 
prop.load(getClass().getResourceAsStream(filename));

} catch (IOException ex) {
ex.printStackTrace();
    }
return prop;

}



Call Method

public static void main(String[] args) {
// TODO Auto-generated method stub

String path = new PropUtil().getPropValue().getProperty("FILE_PATH"); 
      }


config.properties

FILE_PATH= download\\bill

댓글

이 블로그의 인기 게시물

spring boot as a windows service

PHP Date format