Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ConexaoBanco {
- public static Connection conexaoBanco()throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException{
- Class.forName("com.mysql.jdbc.Driver");
- final String DATABASE_URL = "jdbc:mysql://localhost:3306/teste?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC";
- final String ROOT = "root";
- final String SENHA = "";
- Connection conexao = DriverManager.getConnection(DATABASE_URL,ROOT,SENHA);
- return conexao;
- }
- }
Add Comment
Please, Sign In to add comment