Spring Boot 3 integration H2 quick example

Here is a Spring sub-module project built in a multi-level project to demonstrate the integration of H2 and Spring Boot, and a separate Spring Boot is simpler. Note: Spring Boot 3 integrates H2 slightly differently than Spring Boot 2.

Version

  • Spring Boot 3.0.5
  • Development IDE: Spring Tool Suite 4

step

  1. The version of Spring Boot configured in the parent project pom.xml
  <!--  配置依赖版本 -->
  <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>
  1. Add a module under the parent project

insert image description here

Tick ​​to create a simple project, that is, use any project skeleton. <

Guess you like

Origin blog.csdn.net/oscar999/article/details/131819805
Recommended