in my maven project, I am having an error in jdbc. the code is given below. I am using the dependency :
<!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
"dependency"
"groupId"org.springframework"/groupId"
"artifactId" spring-jdbc "/artifactId"
"version" 5.2.7.RELEASE "/version"
here is my java code:
public class Main {
public static void main(String[] args) {
try {
String DATABASE_URL = "jdbc:mysql://localhost:3306/java";
Connection connection = DriverManager.getConnection(DATABASE_URL, "root", "1234");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
EDIT: I am using SQL 8, with JDK 11.