方法一:使用springBoot项目搭建工具
搭建spring boot服务时经常出现服务搭建好了,但是启动时总是报各种各样的错误。以下是spring boot服务搭建的比较快速有效的方式,登录浏览器输入https://start.spring.io/如下图操作步奏:
maven项目后下载到本地,通过启动类启动是如果报错如下:
Cannot determine embedded database driver class for database type NONE.
Acyion:
If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).
找到pom.xml文件添加一下依赖在重启服务:
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>