错误原因:
pom文件中引入
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
启动时会默认读取数据库配置,但未配置数据库连接时报错,
在启动类上添加
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)