Spring BootH2 In-Memory Database
Spring Boot

H2 In-Memory Database

Use H2 for local development and testing.

Setup

Add H2 dependency and configure:
application.properties
# application.properties
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.h2.console.enabled=true
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect