1. 数据库时区问题
[2020年4月16日15:07:07]
问题报错: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.
问题原因:看这句话的意思 时区比一个时区更XX,应该就是时区哪里出了问题,网上找了下,解决方案如下
解决方案:URL后面添加一串字符private final static String MySQL_URL = "jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai";