错因:
未设置时区和乱码
springboot与mybaits整合时,出现的异常:
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: 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 specific time zone value if you want to utilize time zone support
解决:
在数据库连接池设置时区及编码
serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8
在数据库连接池中配置好即可!