【SpringBoot】配置Mybatis错误

错误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:

在这里插入图片描述
ERROR 9316 — [nio-8080-exec-1] com.alibaba.druid.pool.DruidDataSource : init datasource error, url: jdbc:mysql://localhost:3306/springboottest?useUnicode=true&characterEncoding=utf-8?serverTimezone=GMT%2B8

java.sql.SQLException: Unsupported character encoding ‘utf-8?serverTimezone=GMT+8’
在这里插入图片描述
修正:
url: jdbc:mysql://localhost:3306/springboottest?useUnicode=true&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/OrangeChenZ/article/details/87642156