这个错也折腾了我好久,醉胡总结就是mysql驱动版本问题。

首先看看application.properties文件里查看mysql驱动
application.properties文件
正确的应该为:
application.properties文件
然后进入pom.xml看看导入到炸包版本

  <dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-thymeleaf</artifactId>
  <version>2.0.4.RELEASE</version>
  </dependency>

这里注意版本号 2.0.4.RELEASE 之前用的的2.1.3.RELEASE,版本过高。

下面为正确的炸包配置

在这里插入图片描述

<?xml version="1.0" encoding="UTF-8"?>


4.0.0

org.springframework.boot
spring-boot-starter-parent
2.0.4.RELEASE




0.0.1-SNAPSHOT

org.springframework.boot spring-boot-starter-web mysql mysql-connector-java runtime org.mybatis.spring.boot mybatis-spring-boot-starter 1.3.2 org.springframework.boot spring-boot-starter-thymeleaf org.springframework.boot spring-boot-starter-test test
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>1.4.0</version>
org.springframework.boot spring-boot-maven-plugin
Logo

更多推荐