SpringBoot整合Jpa啓動出錯

錯誤信息如下:

If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.

在pom中加入H2 Database依賴即可,如下:

<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<scope>runtime</scope>
</dependency>

注意scope是runtime。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章