Last active
July 29, 2024 20:02
-
-
Save jeffersonchaves/5680661e5cc1bda5b6772cbe37dddd6b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class ConnectionFactory { | |
public Connection getConnection(){ | |
String database = ""; | |
String user = ""; | |
String pass = "" | |
try { | |
return DriverManager.getConnection("jdbc:mysql://localhost/".database, user, pass); | |
} catch (SQLException e) { | |
throw new RuntimeException(e); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment