Created
June 14, 2019 22:00
-
-
Save Kuassim/4e765a3caf957f50b205e3f6ec6920e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final static String DB_PASSWORD = "<my password>"; // Can also be recup'ed from environment | |
final static String DB_USER ="<my user>"; // can also be recup'ed from env | |
String DB_URL = System.getenv("url"); | |
if (DB_URL == null ) { | |
System.out.println("Environment variables url must be set"); | |
System.exit(1); | |
} | |
Properties info = new Properties(); | |
info.put(OracleConnection.CONNECTION_PROPERTY_USER_NAME, DB_USER); | |
info.put(OracleConnection.CONNECTION_PROPERTY_PASSWORD, DB_PASSWORD); | |
OracleDataSource ods = new OracleDataSource(); | |
ods.setURL(DB_URL); | |
ods.setConnectionProperties(info); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment