社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
问题: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
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!