Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package produtos;
- import java.sql.Connection;
- import java.sql.DriverManager;
- public class ConnectionFactory {
- public Connection getConnection(){
- try {
- Class.forName("com.mysql.jdbc.Driver");
- return DriverManager.getConnection(
- //"jdbc:mysql://35.223.2.93:3306/"
- "jdbc:mysql://mysqltrab.mysql.database.azure.com:3306/"
- + "main?useTimezone=true&serverTimezone=America/"
- + "Sao_Paulo",
- "spati@mysqltrab", "102030Gui!");
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement