Caused by: java.lang.RuntimeException: java.sql.SQLException: The server time zone value ‘?D1ú±ê×?ê±
2021/12/22 2:25:16
本文主要是介绍Caused by: java.lang.RuntimeException: java.sql.SQLException: The server time zone value ‘?D1ú±ê×?ê±,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
Caused by: java.lang.RuntimeException: 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. at com.baomidou.mybatisplus.generator.config.DataSourceConfig.getConn(DataSourceConfig.java:206) at com.baomidou.mybatisplus.generator.config.querys.DecoratorDbQuery.<init>(DecoratorDbQuery.java:58) at com.baomidou.mybatisplus.generator.IDatabaseQuery$DefaultDatabaseQuery.<init>(IDatabaseQuery.java:97) at com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder.getTableInfoList(ConfigBuilder.java:139) at com.baomidou.mybatisplus.generator.engine.AbstractTemplateEngine.batchOutput(AbstractTemplateEngine.java:226)
解决:
private static String DATA_BASE_URL = "jdbc:mysql://127.0.0.1:3306/excel-data?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC"; private static String DATA_BASE_USERNAME = "root"; private static String DATA_BASE_PASSWORD = "root"; 1.在连接字符串后面加上?serverTimezone=UTC 其中UTC是统一标准世界时间。 2.useUnicode=true&characterEncoding=UTF-8,这个是解决中文乱码输入问题
这篇关于Caused by: java.lang.RuntimeException: java.sql.SQLException: The server time zone value ‘?D1ú±ê×?ê±的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-01后台管理开发学习:新手入门指南
- 2024-11-01后台管理系统开发学习:新手入门教程
- 2024-11-01后台开发学习:从入门到实践的简单教程
- 2024-11-01后台综合解决方案学习:从入门到初级实战教程
- 2024-11-01接口模块封装学习入门教程
- 2024-11-01请求动作封装学习:新手入门教程
- 2024-11-01登录鉴权入门:新手必读指南
- 2024-11-01动态面包屑入门:轻松掌握导航设计技巧
- 2024-11-01动态权限入门:新手必读指南
- 2024-11-01动态主题处理入门:新手必读指南