Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/developer-rakeshpaul/jenkins-spring-boot-api
https://github.com/developer-rakeshpaul/jenkins-spring-boot-api
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/developer-rakeshpaul/jenkins-spring-boot-api
- Owner: developer-rakeshpaul
- Created: 2022-06-24T04:28:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-30T03:11:31.000Z (over 2 years ago)
- Last Synced: 2023-03-05T19:51:42.258Z (almost 2 years ago)
- Language: HCL
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![CI](https://github.com/tkgregory/spring-boot-api-example/actions/workflows/gradle.yml/badge.svg)](https://github.com/tkgregory/spring-boot-api-example/actions/workflows/gradle.yml)
## Overview
An example project to demonstrate:
* how to create a Spring Boot REST API ([article](https://tomgregory.com/building-a-spring-boot-application-in-jenkins/) | [video](https://youtu.be/sCcuUMn1vdM))
* how to run Spring Boot in Docker and publish to Docker Hub ([article](https://tomgregory.com/building-a-spring-boot-application-in-docker-and-jenkins/) | [video](https://youtu.be/Kc3Vw5vk1Lw))
* how to deploy the Spring Boot application to AWS with CloudFormation ([article](https://tomgregory.com/deploying-a-spring-boot-application-into-aws-with-jenkins/) | [video](https://youtu.be/5xh0nAYeZNc))## 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= -Pregion=`
### Deleting AWS deployment
`./gradlew awsCfnDeleteStack awsCfnWaitStackComplete`
## Using API
* get all rides - GET [/ride](http://localhost:8080/ride) to get a list of all the rides
* get specific ride - GET [/ride/${id}](http://localhost:8080/ride/1) to get a specific ride
* create ride - POST JSON to [/ride](http://localhost:8080/ride) to create a new ride
(see [article](https://tomgregory.com/building-a-spring-boot-application-in-jenkins/#2_Trying_out_our_Spring_Boot_application) for full details)## Need further support?
Contact me if you need help at [email protected].