Skip to content

An example of a spring boot app with the ability to automatically build and run inside of docker

Notifications You must be signed in to change notification settings

v1bh0r/spring-boot-local-dev-docker

Repository files navigation

Demo App - Spring Boot Local Development on Docker

Getting Started

Install Docker

https://docs.docker.com/get-docker/

Build and Run the code

docker-compose build
docker-compose up

Test

On visiting http://localhost:8080/api/ in your browser

You should see "Hello Human"

Notice that you don't have to re-build the code when you make code changes. You can even enable automatic refresh on Chrome by installing LiveReload plugin

Test Database persistence

Create a record
curl --location --request POST 'http://localhost:8080/api/employees/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "John Doe"
}'
List all records
curl http://localhost:8080/api/employees/

Reference Documentation

For further reference, please consider the following sections:

Troubleshooting

Code changes are not automatically detected

docker/for-win#8479

About

An example of a spring boot app with the ability to automatically build and run inside of docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published