美文网首页Spring Boot
Spring Boot+Mysql启动报错

Spring Boot+Mysql启动报错

作者: 葉糖糖 | 来源:发表于2019-06-18 10:27 被阅读0次

    开发过程中使用的是MySql5.7的数据库,启动Spring Boot工程遇到如下错误:

    1、错误信息提示

    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.

    2、解决问题方案

    阅读错误提示信息得知这个错误与MySql的时区设置有关系。

    第一种方案:直接修改JDBC连接字符串,在其中添加&serverTimezone=UTC即可;

    第二种方法:修改数据库中的设置。

    3、细心思考问题

    驱动包版本过高会引发这样的问题。

    相关文章

      网友评论

        本文标题:Spring Boot+Mysql启动报错

        本文链接:https://www.haomeiwen.com/subject/mkyxqctx.html