Skip to content

code-with-dilip/item-service-springboot-java11

Repository files navigation

item-service-springboot-java11

This code base has the code to run a spring boot application in a Java 11 environment.

Build the application

./gradlew clean build

Launch the application

 java -jar -Dspring.profiles.active=prod build/libs/item-service-springboot-java11-0.0.1-SNAPSHOT.jar

Docker

  • There are two files which takes care of the whole docker process.
    • Dockerfile
    • docker-entrypoint.sh

Build the docker image

  • The Docker build options are explained here.
    -t -> Providing a tag name for the docker image.

  • The below command creates a docker image with name item-service and the tag is 1.0.

docker build -t item-service:1.0 . 

Command to Run the Docker Image

docker run -p 8090:8080 -t item-service:1.0

Access the application inside the container.

curl http://localhost:8090/v1/greeting
curl http://localhost:8090/v1/items

About

This repository has the code to run a spring boot application in a Java 11 environment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published