springboot+mybatis+mysql 出现的简单500错误问题

当SpringBoot、Mybatis和MySQL集成时遇到500错误,具体表现为时区识别异常。错误信息指出服务器时区值'Öйú±ê׼ʱ¼ä'未被识别,需要在配置文件中修改JDBC连接字符串,添加&serverTimezone=GMT或UTC参数来指定特定时区。此外,添加?useUnicode=true&characterEncoding=utf-8可解决中文乱码问题。
摘要由CSDN通过智能技术生成

 页面报500的时区错误,详情如下:

2019-03-21 17:49:20.591 ERROR 5088 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain 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. ### The error may exist in file [D:\springboot-mybatis-demo\target\classes\mapping\UserInfoMapper.xml] ### The error may involve com.ocean.dao.UserInf

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值