an exmaple for spring data DAO unit testing with embeded postgres in spring boot application
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.mvn/wrapper first commit round Sep 3, 2018
imgs add readme and code formatting Sep 3, 2018
src add readme and code formatting Sep 3, 2018
.gitignore first commit round Sep 3, 2018
README.md Update README.md Sep 3, 2018
mvnw first commit round Sep 3, 2018
mvnw.cmd
pom.xml first commit round Sep 3, 2018

README.md

Springboot-PostgreSQL-Embedded-Dao-Testing

About

This is a sample application to show how to do DAO unit testing using embedded PostgreSQL DB to replicate the same conditions of your production application if you have use PostgreSQL DB.

Detailed explanation can be found in : https://mromeh.com/2018/09/03/spring-boot-with-embedded-postgresql-for-dao-integration-unit-testing-and-local-development/


alt text


Tech stack:

  • Spring boot 2
  • Spring data
  • Spring REST
  • Lombok
  • PostgreSQL
  • Mapstruct for DTO mapping
  • Swagger 2

How to compile and install:

it is a maven project , so just clean and install and should be ready !

mvn clean install 

How to run the locally :

Once you run the spint boot application locally from the main class, you can test the rest API on the browser via SWAGGER

http://localhost:8080/swagger-ui.html