An open API service indexing awesome lists of open source software.

https://github.com/daggerok/spring-jdbc-h2-schema

This repo demonstrates spring-boot JDBC using filesystem based h2 database in MySQL mode
https://github.com/daggerok/spring-jdbc-h2-schema

h2-database spring-boot spring-jdbc

Last synced: 2 months ago
JSON representation

This repo demonstrates spring-boot JDBC using filesystem based h2 database in MySQL mode

Awesome Lists containing this project

README

          

= spring-jdbc-h2-schema image:https://travis-ci.org/daggerok/spring-jdbc-h2-schema.svg?branch=spring-datasource-platform["Build Status", link="https://travis-ci.org/daggerok/spring-jdbc-h2-schema"]

This repo showing how setup:

- spring-boot JDBC
- filesystem based h2 database in MySQL mode

branch link:https://github.com/daggerok/spring-jdbc-h2-schema/tree/java-config/[java-config] contains jdbc DDL/DML
populator java configuration

branch link:https://github.com/daggerok/spring-jdbc-h2-schema/tree/default-schame-and-data-files-location/[default-schame-and-data-files-location]
contains jdbc DDL/DML populator by default spring-boot initialize database convention:

- `src/main/resources/schema.sql` DDL scripts
- `src/main/resources/data.sql` DML scripts

and finally link:https://github.com/daggerok/spring-jdbc-h2-schema/tree/spring-datasource-platform/[spring-datasource-platform]
branch contains platform specific sql scripts (do not forget setup `spring.datasource.platform` properties in
`src/main/resources/application.properties` or `src/main/resources/application.yaml` config file

links:

- link:https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html[Spring database initialization reference]
- link:https://docs.spring.io/spring/docs/current/spring-framework-reference/data-access.html[Spring JDBC some reference]

//tag::content[]
.gradle
[source,bash]
----
./gradlew
java -jar build/libs/*.jar
bash build/libs/*.jar
----

.maven
[source,bash]
----
./mvnw
java -jar target/*.jar
bash target/*.jar
----

generated by link:https://github.com/daggerok/generator-jvm/[jvm] yeoman generator
//end::content[]