### H2 内存数据库
# 内存中:jdbc:h2:mem:testdb
# 指定路径:jdbc:h2:~/testdb 或 jdbc:h2:/data/db/testdb 或 jdbc:h2:data/db/testdb 或 jdbc:h2:tcp://localhost/~/testdb
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
# 开启H2的控制台
spring.h2.console.enabled=true
# H2控制台路径:http://localhost:18080/h2-console
# 访问控制台后,需要将 页面的 URL输入框的值 改为前面配置的 “spring.datasource.url”的值 才能访问
spring.h2.console.path=/h2-console
spring.h2.console.settings.trace=false
# web-allow-others=false:只能本地访问
spring.h2.console.settings.web-allow-others=false
<!-- H2 内存数据库 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>