public static void initProperty(String environment) throws IOException {
InputStream inStream = null;
if("local".equals(environment)) {
inStream = new FileInputStream(new File("src/main/resources/application-local.property"));
}
if("test".equals(environment)) {
inStream = new FileInputStream(new File("src/main/resources/application-test.property"));
}
if("prod".equals(environment)) {
inStream = new FileInputStream(new File("src/main/resources/application-prod.property"));
}
properties.load(inStream);
}