💡Spring Boot tip: Use H2 if you need an in-memory database for dev/testing.
✅Add the dependency:
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
✅Configure the database in the properties or yaml file:
# H2 database configuration
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=passw
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
# Enable H2 web console
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console
http://localhost:8080/h2-console
✅Access the console at /h2-console:
http://localhost:8080/h2-console
#SpringBoot#H2Database
Next @signum_official version in the making...
Some current features:
- @h2database upgraded to Version 2
- @PostgreSQL support
and more to come. Won't be an HF update... 💪