Springboot整合Mybatis时遇到的问题

java.sql.SQLException: Unable to load authentication plugin ‘caching_sha2_password’.

xml文件
mysql版本添加8.0.11

Public Key Retrieval is not allowed

url中,加上allowPublicKeyRetrieval=true参数

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.

时区问题
url添加 serverTimezone=GMT

java.sql.SQLException: validateConnection false

德鲁伊版本问题,将其改成1.1.10

  <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.1.10</version>
</dependency>

改完后:Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

你可能感兴趣的:(秒杀系统实战)