Skip to content

dhagge/spring-boot-jdbi-seed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot + JDBI

Description

This is a seed project for building a RESTful API with Spring Boot and JDBI:

  • Java 8
  • Spring Boot
  • MySql
  • Checkstyle
  • Findbugs

It also features:

  • Integration tests
  • Seperate prod liquibase scripts which are tested as part of the integration tests

Install MySql

The seed project uses MySQL 5.7+ and can be installed quite easily on mac, linux or windows following this guide

Command Line

Typical usage is to:

  • Build the project (note: this will create the test and integration-test databases in mysql)
  • Run the liquibase schema upgrade
  • Run the liquibase db seed

Build the project

gradlew clean install

This command will run the build, unit tests and integration tests.

Run liquibase schema upgrade

gradlew dbUpdate

Run the liquibase db seed script

gradlew dbSeed

Running the API

Start the service by running the following command:

gradlew bootRun

You can now consume the service endpoints which will run at http://localhost:9090.

The in-built test resource (com.myco.TestResource) is available at:

Tutorial

See this tutorial for further info as it highlights the bare-bones changes needed just to integrate Spring Boot + JDBI.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages