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
- Host: GitHub
- URL: https://github.com/daggerok/spring-jdbc-h2-schema
- Owner: daggerok
- License: mit
- Created: 2018-05-21T21:13:56.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-21T21:38:30.000Z (about 8 years ago)
- Last Synced: 2025-01-10T00:41:49.613Z (over 1 year ago)
- Topics: h2-database, spring-boot, spring-jdbc
- Language: Java
- Size: 112 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
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[]