Properties properties = new Properties();
           InputStream in =PropertyUtils.class.getClassLoader().getResourceAsStream("service.properties");
properties.load(in);
 
       Class.forName("org.postgresql.Driver");
        String url=properties.getProperty("jdbc.url");
        conn = DriverManager.getConnection(url,properties.getProperty("jdbc.username"),properties.getProperty("jdbc.password"));