Spring Boot启动报错:Cannot determine embedded database driver class for database type NONE

最近在学习使用spring boot。使用maven创建好工程,写了一个hello world的demo.运行了一下报错:Cannot determine embedded database driver class for database type NONE

如下:

Spring Boot启动报错:Cannot determine embedded database driver class for database type NONE


后来发现是Maven的配置文件pom.xml里面, 自己引入了mybatis的依赖.屏蔽mybatis的依赖后maven重新import changes.在线编译就成功了。

Spring Boot启动报错:Cannot determine embedded database driver class for database type NONE

Springboot内置了tomcat,run成功后可以看的运行端口为8080,如下:

Spring Boot启动报错:Cannot determine embedded database driver class for database type NONESpring Boot启动报错:Cannot determine embedded database driver class for database type NONE

在浏览器输入localhost:8080/hello, (路由可以自己定义)可以看到输出hello world。spring boot搭建的第一个demo算是成功了。

Spring Boot启动报错:Cannot determine embedded database driver class for database type NONESpring Boot启动报错:Cannot determine embedded database driver class for database type NONE


Spring Boot启动报错:Cannot determine embedded database driver class for database type NONESpring Boot启动报错:Cannot determine embedded database driver class for database type NONE