错误提示:

Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is 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.

解决方法:

在连接字符串后面加上?serverTimezone=UTC

其中UTC是统一标准世界时间。

完整的连接字符串示例:jdbc:mysql://localhost:3306/test?serverTimezone=UTC

或者还有另一种选择:jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8,这个是解决中文乱码输入问题,当然也可以和上面的一起结合:jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC

三、SpringBoot启动时JDBC报错:You must configure either the server or JDBC driver (via the serverTimezone configuration property)的更多相关文章

  1. springboot工程启动时,报错:No bean named 'shiroFilter' available

    在启动Springboot项目时,报错:org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ' ...

  2. springboot 启动的时候报错 Error creating bean with name 'solrClient'

    springboot 启动的时候报错: org.springframework.beans.factory.BeanCreationException: Error creating bean wit ...

  3. 【转载】在使用JDBC连接MySql时报错: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

    在使用JDBC连接MySql时报错:You must configure either the server or JDBC driver (via the serverTimezone config ...

  4. 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

    java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more tha ...

  5. You must configure either the server or JDBC driver (via the serverTimezone configuration property

    使用JDBC连接MySql时出现:The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one ...

  6. Tomcat 启动时项目报错 org.springframework.beans.factory.BeanCreationException

    事情是这样的,最近我们公司需要将开发环境和测试环境分开,所以就需要把所有的项目部署一套新的开发环境. 我们都是通过 Jenkins 进行部署的,先说一下两个环境的配置: 测试环境配置(旧):jdk1. ...

  7. web项目——启动时tomcat报错:Server Tomcat v7.0 Server at localhost failed to start.

    报错信息:Server Tomcat v7.0 Server at localhost failed to start. 报错截图: 原因分析:在使用SSM框架时,生成的mapping与系统配置文件不 ...

  8. egg启动时,报错:Ignoring invalid timezone passed to Connection的解决方案

    报错信息 Ignoring invalid timezone passed to Connection: +8:00. This is currently a warning, but in futu ...

  9. Oracle-11g 数据库启动时,报错"ORA-01092"及"ORA-18008: cannot find OUTLN schema"

    适用情形: Oracle-11g 数据库启动时,出现类似如下错误. ORA-01092: ORACLE instance terminated. Disconnection forced ORA-18 ...

随机推荐

  1. 【2】Zookeeper安装

    一.环境准备 Linux操作系统 Java运行环境(1.6或以上) 服务器列表: 配置主机名映射. vi /etc/hosts ##添加如下内容 168.5.7.75 server1 168.5.7. ...

  2. php迭代器Iterator接口

    以前也看过迭代器Iterator接口,感觉不如yied好用,因此实际工作中并没有用到过. 今天看了一篇网上的博客(https://www.cnblogs.com/wwjchina/p/7723499. ...

  3. 微信小程序音乐播放器

    写在前面 1.入门几天小白的作品,希望为您有帮助,有好的意见或简易烦请赐教 2.微信小程序审核音乐类别已经下架,想要发布选题需慎重.附一个参考链接,感谢https://www.hishop.com.c ...

  4. C++二叉树前中后序遍历(递归&非递归)统一代码格式

    统一下二叉树的代码格式,递归和非递归都统一格式,方便记忆管理. 三种递归格式: 前序遍历: void PreOrder(TreeNode* root, vector<int>&pa ...

  5. gcd(欧几里得算法)与exgcd(扩展欧几里得算法)

    欧几里得算法: 1.定义:gcd的意思是最大公约数,通常用扩展欧几里得算法求 原理:gcd(a, b)=gcd(b, a%b) 2.证明: 令d=gcd(a, b)  =>  a=m*d,b=n ...

  6. hive单机部署

    hadoop,hbase,zookeeper安装好了,现在来安装hive hadoop 版本:2.8.4 hbase 版本:2.1.3 hive 版本:2.3.4 zookeeper 版本:3.4.1 ...

  7. python: 错误处理try详解 ,traceback调用栈, 调试(logging)

    摘录:https://www.liaoxuefeng.com/wiki/1016959663602400/1017598873256736 错误处理 调试 错误处理 高级语言都会使用内置的一套try. ...

  8. Spring事务源码分析

    首先看例子,这例子摘抄自开涛的跟我学spring3. @Test public void testPlatformTransactionManager() { DefaultTransactionDe ...

  9. Linux根目录下各目录文件类型及各项缩写全称

    bin(binary) :常见linux命令.系统所有用户命令目录文件dev(device) : 设备驱动存储目录文件media: 多媒体及挂载目录proc (process):进程信息文件sbin( ...

  10. php类知识---最疯狂的魔术方法serialize,_sleep,__wakeup,unserialize,__autoload,__clone

    serialize-----把实例化的对象写入文件 __sleep 调用serialize时触发 <?php class mycoach { public function __construc ...