Created
May 18, 2016 14:53
-
-
Save handersonbf/043bfcab5f90a1c2d759b881c9e835fa 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
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.SQLException; | |
public class ConnectionFactory { | |
public Connection getConnection(){ | |
try { | |
return DriverManager.getConnection( | |
"jdbc:mysql://localhost/3wjavaweb", "root", "root"); | |
} 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