1. 程式人生 > 實用技巧 >SpringBoot專案初步搭建一

SpringBoot專案初步搭建一

方法一:使用springBoot專案搭建工具

搭建spring boot服務時經常出現服務搭建好了,但是啟動時總是報各種各樣的錯誤。以下是spring boot服務搭建的比較快速有效的方式,登入瀏覽器輸入https://start.spring.io/如下圖操作步奏:

maven專案後下載到本地,通過啟動類啟動是如果報錯如下:

CannotdetermineembeddeddatabasedriverclassfordatabasetypeNONE.

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>