public class JdbcConfig {
public static void main(String[] args) {
JdbcConfig jdbcConfig = new JdbcConfig();
Properties p = jdbcConfig.getJdbcConfig();
}
public Properties getJdbcConfig() {
InputStream in = this.getClass().getResourceAsStream("/db.properties");
Properties props = new Properties();
try{
InputStreamReader inputStreamReader = new InputStreamReader(in, "UTF-8");
props.load(inputStreamReader);
}catch (IOException e){
e.printStackTrace();
}
return props;
}