Advertisement
Guest User

Untitled

a guest
Apr 9th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. /*
  2. * (non-Javadoc)
  3. *
  4. * @see manageuser.dao.BaseDao#getConnetion()
  5. */
  6. @Override
  7. public Connection getConnetion() throws SQLException, ClassNotFoundException, IOException {
  8. Class.forName("com.mysql.jdbc.Driver");
  9. String dbUrl = ConfigProperties.getData("DB_URL");
  10. String dbName = ConfigProperties.getData("DBNAME");
  11. String addUrl = ConfigProperties.getData("ADD_URL");
  12. String username = ConfigProperties.getData("USERNAME");
  13. String password = ConfigProperties.getData("PASSWORD");
  14. String connectionURL = dbUrl + dbName + addUrl;
  15. connectionDB = DriverManager.getConnection(connectionURL, username, password);
  16. return connectionDB;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement