前面准备工作
h2数据库的连接
1.创建数据库
右击右下角黄色图标,单击创建新的数据库
设置用户名密码
单击h2/bin 目录下的 h2.bat
在弹出的浏览器中输入 http://localhost:8082
连接
springboot中整合JPA和H2
1.添加依赖
org.springframework.boot
spring-boot-starter-data-jpa
com.h2database
h2
2.yml配置
server:
port: 8000
spring:
jpa:
generate-ddl: false
show-sql: true
hibernate:
ddl-auto: none
datasource:<