异常:MySQLNonTransientConnectionException: Could not create connection to database server.
形成异常的原因:本地安装mysql版本和项目中驱动的版本不一致
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
<scope>runtime</scope>
</dependency>
配置中的驱动类也需要设置成最新的
driver: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/travel?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true