Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingYu-Z committed Mar 31, 2021
1 parent 86eb519 commit 5d69bd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.37</version>
<scope>runtime</scope>
</dependency>

Expand Down
7 changes: 6 additions & 1 deletion src/main/java/cn/beingyi/mysql/utils/JDBCUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ public class JDBCUtils {

static {
try {
Class.forName("com.mysql.cj.jdbc.Driver");
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
try {
Class.forName("com.mysql.cj.jdbc.Driver");
} catch (ClassNotFoundException classNotFoundException) {
classNotFoundException.printStackTrace();
}
}
}

Expand Down

0 comments on commit 5d69bd5

Please sign in to comment.