Spring H2 Support: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 20: Line 20:
Add in [[application.properties]] or equivalent:
Add in [[application.properties]] or equivalent:


<syntaxhighlight lang=''>
<syntaxhighlight lang='text'>
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=something
spring.datasource.username=something

Revision as of 05:33, 19 October 2018

Internal

Overview

Dependencies

dependencies {

    implementation('org.springframework.boot:spring-boot-starter-data-jpa')
    runtimeOnly('com.h2database:h2')
}

Spring Configuration

Add in application.properties or equivalent:

spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=something
spring.datasource.password=somethingelse

SpringBoot DevTools H2 Console

SpringBoot DevTools H2 Console