Exception in thread "main" java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecogn - Go语言中文社区

Exception in thread "main" java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecogn


问题:Exception in thread "main" 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”不然会因为时区问题报错

jdbc:mysql://localhost:3306/person?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
解决方法:url后面添加一部分
jdbc:mysql://127.0.0.1:3306/ssmdemo?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true

                                    
                        
版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/qq_39401280/article/details/105369852
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-04-18 14:36:27
  • 阅读 ( 1366 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢