Overriding Primary Key Generation Strategy in JPA + Liquibase Cont...
Spring , Jpa / May 14, 2019
My last post titled Overriding Primary Key Generation Strategy in JPA + Liquibase discusses how Spring Boot Application can work with multiple databases.
The Source Code here demonstrates what I explained in the aforementioned post.
Getting Started
Before running the Java Application use the Shell Scripts in the project root to get a database running.
Change the Spring Profile to activate the configuration for the database of your choice.
Working with Oracle
run_oracle.sh
will need an Oracle XE Image. To create this image please refer to their GitHub.
In addition you will need the Oracle Driver added as a dependency. For that you can do one of the following.
- Download the jar file from Oracle. Put that inside a
libs
directory and updatebuild.gradle
with the following.
- If you have an Enterprise Artifactory with the Driver get it from there.
Note that the first option is not recommended for production.