/spring-boot-jpa-mongodb-example

Spring Boot application example with JPA or MongoDB and same codebase

Primary LanguageJava

Build Status

Spring boot + JPA + MongoDB application sample

This application demonstrate how to build a Spring Boot application which can switch between JPA and MongoDB with only configuration changes.

Prerequisites

Run with JPA (PostgreSQL database)

./start_app.sh jpa

This will start PostgreSQL database through a docker image (postgres:9.6), and then start the application. If you see following message, it means the application works great:

People found:
Perceval
Karadoc

Run with MongoDB

./start_app.sh mongodb

Run all tests

./gradlew check