Skip to content

Instantly share code, notes, and snippets.

@pedromamede
Created November 6, 2013 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedromamede/7340140 to your computer and use it in GitHub Desktop.
Save pedromamede/7340140 to your computer and use it in GitHub Desktop.
public static Connection getConnection(){
try {
Class.forName("com.mysql.jdbc.Driver");
return DriverManager.getConnection(DATABSE_URL, USERNAME, PASSWORD);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment