首页 > 其他 > 详细

【SSM开发过程中的问题】

时间:2020-04-05 22:53:25      阅读:90      评论:0      收藏:0      [点我收藏+]

【MyBatis - maven项目 - 调用代理Dao中的方法时-执行错误;】

{1}
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.
Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Client does not support authentication protocol requested by server; consider upgrading MySQL client
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Client does not support authentication protocol requested by server; consider upgrading MySQL client
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Client does not support authentication protocol requested by server; consider upgrading MySQL client

原因:MySQL数据库版本位 8.0 - 数据库驱动位 5.多,这个驱动不行了

解决:pom.xml中重新设置 MySQL驱动版本8.多,

{2}
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.jdbc.Driver‘过时了,用com.mysql.cj.jdbc.Driver;

{3}
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.
Cause: java.sql.SQLException:
The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized or represents more than one time zone.
You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

### Cause:
java.sql.SQLException:
The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized or represents more than one time zone.
You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

Caused by:
java.sql.SQLException:
The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized or represents more than one time zone.
You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

Caused by:
com.mysql.cj.exceptions.InvalidConnectionAttributeException:
The server time zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized or represents more than one time zone.
You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

原因分析:
根据报错我们知道这是时间报错,
没有指定明确的时区,
是因为新版的mysql会询问是否SSL连接,返回一个Boolean值,我们需要手动指定true或者false。
所以再次更改配置文件中的 url 满足其要求即可,如下:
jdbc:mysql://localhost:3306/mybatis?characterEncoding=utf-8&serverTimezone=UTC&useSSL=false"
jdbc:mysql://localhost:3306/mybatis?serverTimezone=UTC&useSSL=false --会有问题 & 后加[amp]???为啥?

【web.xml - maven项目 - 调用代理Dao中的方法时-执行错误;】

报错:Multiple annotations found at this line:

可能:有的地方多了空格,或者多了标点;

【SSM开发过程中的问题】

原文:https://www.cnblogs.com/floakss/p/12639470.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!