mihretkidane / spring-boot-api-example

Sample Spring Boot application that exposes a REST API for theme park rides. Accompanies "Building a Spring Boot application in Jenkins" video and article.

Home Page:https://youtu.be/sCcuUMn1vdM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CI

Overview

An example project to demonstrate:

  • how to create a Spring Boot REST API (article | video)
  • how to run Spring Boot in Docker and publish to Docker Hub (article | video)
  • how to deploy the Spring Boot application to AWS with CloudFormation (article | video)

Pre-requisites

  • JDK 8+
  • Docker

Building

Testing

./gradlew test

Building (no tests)

./gradlew assemble

Building (with tests)

./gradlew build

Running in Docker

./gradlew assemble docker dockerRun

Stopping Docker container

./gradlew dockerStop

Deploying to AWS

./gradlew awsCfnMigrateStack awsCfnWaitStackComplete -PsubnetId=<your-subnet-id> -Pregion=<your-region>

Deleting AWS deployment

./gradlew awsCfnDeleteStack awsCfnWaitStackComplete

Using API

  • get all rides - GET /ride to get a list of all the rides
  • get specific ride - GET /ride/${id} to get a specific ride
  • create ride - POST JSON to /ride to create a new ride (see article for full details)

Need further support?

Contact me if you need help at tom@tomgregory.com.

About

Sample Spring Boot application that exposes a REST API for theme park rides. Accompanies "Building a Spring Boot application in Jenkins" video and article.

https://youtu.be/sCcuUMn1vdM


Languages

Language:Java 98.4%Language:Dockerfile 1.6%