这里是在一个多层级项目中搭建一个Spring的子模块项目用于演示 H2与Spring Boot的整合,单独的Spring Boot则更为简单。需要注意:Spring Boot 3 整合H2 相比Spring Boot 2有细微差别。
版本
- Spring Boot 3.0.5
- 开发IDE : Spring Tool Suite 4
步骤
- 父项目pom.xml中配置的Spring Boot的版本
<!-- 配置依赖版本 -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>3.0.6</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
- 在父项目下增加一个模块
勾选创建一个简单的项目, 也就是使用任何项目骨架。<