Spring PostgreSQL Support: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 21: Line 21:


If using [[Spring_Boot_Concepts#Spring_Boot_Database_Initialization|Spring Boot Database Initialization]] and Postgres-specific DDL and DML, create schema-postgres.sql, data-postgres.sql files and configure the "plaform" as:
If using [[Spring_Boot_Concepts#Spring_Boot_Database_Initialization|Spring Boot Database Initialization]] and Postgres-specific DDL and DML, create schema-postgres.sql, data-postgres.sql files and configure the "plaform" as:
<syntaxhighlight='text'>
<syntaxhighlight lang='text'>
spring.datasource.platform=postgres
spring.datasource.platform=postgres
</syntaxhighlight>
</syntaxhighlight>


More details available here: {{Internal|Spring_Boot_Concepts#Spring_Boot_Database_Initialization|Spring Boot Database Initialization}}
More details available here: {{Internal|Spring_Boot_Concepts#Spring_Boot_Database_Initialization|Spring Boot Database Initialization}}

Revision as of 21:15, 18 October 2018

External

Internal

Overview

Dependencies

dependencies {

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

Configuration

If using Spring Boot Database Initialization and Postgres-specific DDL and DML, create schema-postgres.sql, data-postgres.sql files and configure the "plaform" as:

spring.datasource.platform=postgres

More details available here:

Spring Boot Database Initialization