解决:org.apache.ibatis.exceptions.PersistenceException:

在用8.0版本的jdbc链接数据库jar包时,对于uri的设置要加上时区,并且我忘记了用分号分割,在xml文件中,分号;要用&表示,这是我的代码示例:jdbc:mysql://localhost:3306/XXXXX?useSSL=false&serverTimezone=GMT

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/mmall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
    username: root
    password: root
mybatis-plus:
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

猜你喜欢

转载自blog.csdn.net/liulang68/article/details/107443195