[Spring boot] Integrating with h2 database
2023-09-14 08:59:15 时间
In pom.xml add dependency:
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> </dependency> </dependencies>
Then in application.properties:
spring.h2.console.enabled=true spring.h2.console.path=/h2
Now, in the broswer, we can access h2 database though url: localhost:8080/h2
相关文章
- spring: 使用Spring提供的JDBC模板(使用profiles选择数据源/使用基于JDBC驱动的数据源)
- 云原生 Serverless Database 使用体验
- 20-spring学习-Spring MVC基本操作
- Cannot attach the file as database
- ORA-01155: the database is being opened, closed, mounted or dismounted
- 【Oracle 集群】ORACLE DATABASE 11G RAC 知识图文详细教程之集群概念介绍(一)
- Spring异常解决 java.lang.NullPointerException,配置spring管理hibernate时出错
- Spring Boot——2分钟构建spring web mvc REST风格HelloWorld
- 【报错】android.database.sqlite.SQLiteException: no such column: id (code 1): , while compiling: select
- 【Spring源码学习】spring IOC容器管理
- android 同时打开两个sqlite database db
- mysql:sql create database新建utf8mb4 数据库
- 005-spring cache-原理、缓存AOP机制、Spring Cache抽象集成机制、springboot自动配置机制
- 009-Spring Boot 事件监听、监听器配置与方式、spring、Spring boot内置事件
- Liquibase----XML格式通过update更新H2 Database数据库
- How to Install Oracle 12.2.0.1 Database software in silent mode
- SQL and Database Systems 基本知识
- Mac上IDA报错/:Permission denied Please specify another file path for the database