原因:MySQL8要求必须设置时区
解决方案:
加上红色框里的值,设置时区
附加:
因为使用springboot,它强制将驱动设置成了MySQL8的,所以可能还会有一个建议:
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
解决方案: