根据前端传来数据连接mysql报错 the server time zone value “****” is not recongnized or represents more than one …
经过百度发现,是因为连接mysql时的url过于简单,设置过少,
原先为
URL = “jdbc:mysql://” + ip + “:” + port + “/” + dbName;
修改为
URL = “jdbc:mysql://” + ip + “:” + port + “/” + dbName + “?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8”;
问题得到解决