package tutorialJava.capitulo9_AWT_SWING.ejemplos.ejemplo01_Fabricante.controlador;

import java.sql.Connection;
import java.sql.DriverManager;

public class ConnectionManager {

	private static Connection conn = null;
	
	
	public static Connection getConnection() throws Exception {
		if (conn == null) {
			Class.forName("com.mysql.cj.jdbc.Driver");
		   
			conn = 
					(Connection) DriverManager.getConnection (
					"jdbc:mysql://localhost:3306/tutorialjavacoches?serverTimezone=UTC",
					"root", "1234");
		}
		return conn;
	}
}
