【javaEE】【Mybatis】【JDBC】问题

高版本mysql-connector-java,指的是6.0往后容易出现的一些警告:

1.Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
解决方案:修改驱动为com.mysql.cj.jdbc.Driver 以前的正式放弃的时候了


2.如下的一个警告
警告: com.mchange.v2.async.ThreadPoolAsynchronousRunnerxxxxxxx -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
解决方案:连接地址添加一个serverTimezone=UTC(serverTimezone=America/New_York)即可


3.You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification
You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification
解决方案:连接地址添加一个useSSL=false即可,在高版本需要指明是否进行SSL连接

3.1添加过程中出现的问题

对实体 "characterEncoding" 的引用必须以 ';' 分隔符结尾

http://www.zhimengzhe.com/shujuku/MySQL/83725.html

http://blog.youkuaiyun.com/jinguangliu/article/details/53691609

<property name="url" value="jdbc:mysql://localhost:3306/jikebook?useSSL=true&verifyServerCertificate=false&serverTimezone=UTC" />

4.Exceptionin thread "main" java.lang.UnsupportedClassVersionError:com/mysql/jdbc/Driver : Unsupport
Exceptionin thread "main" java.lang.UnsupportedClassVersionError:com/mysql/jdbc/Driver : Unsupport
解决方案:jdk版本较低,而驱动包的版本较高造成的,要求是jdk1.8以上



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值