Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DBConnection {
- private final static String DB_URL = "jdbc:mysql://localhost:3306/web_training?autoReconnect=true&useSSL=false";
- private final static String USER = "root";
- private final static String PASSWORD = "root";
- public static Connection getConnection() throws SQLException {
- return DriverManager
- .getConnection(DB_URL, USER, PASSWORD);
- }
- }
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.38</version>
- </dependency>
- java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/web_training?autoReconnect=true&useSSL=false
Add Comment
Please, Sign In to add comment