阅读背景:

mysql的驱动类com.mysql.jdbc.Driver过时了,需要用com.mysql.cj.jdbc.Driver代替

来源:互联网 

springboot项目整合mybatis,配置文件如下:

server:
  port: 8081
mybatis:
  config-location: classpath:mybatis/mybatis-config.xml   #mybatis配置文件所在路径
  type-aliases-package: com.yuanqiao.entities     #所有entity别名类所在包
  mapper-locations: classpath:mybatis/mapper/*.xml
spring:
  application:
    name: swaggerdemo
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://localhost:3306/springboot?useUnicode=trueserver:
  p



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: