java hide mysql login credentials code example
Example 1: java hide mysql login credentials
private ResourceBundle reader = null;
try{
reader = ResourceBundle.getBundle("dbconfig.properties");
Connection conn=DriverManager.getConnection(reader.getString("db.url"),reader.getString("db.username"),reader.getString("db.password"));
}catch(Exception e){
}
Example 2: java hide mysql login credentials
/resources/dbconfig.propreties/
Example 3: java hide mysql login credentials
db.driver="driverclassname"
db.url=jdbc:mysql:
db.username=USERNAME
db.password=PASSWORD