Skip to content

A sample microservice that is containerized using docker that performs a simple POST call to save data to DB

Notifications You must be signed in to change notification settings

ramamidi/create-preference-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create Marketing Preferences Microservice

This is the create preference microservice that is responsible to create and update Marketing preferences of customers. This microservice is written in Java/Spring Boot.

Steps to run without docker

Pre-requisites:

Steps to run locally:

  • Run gradle build
  • cd build/libs folder
  • Run java -jar create-preference-service-1.0.0.jar

Run unit tests

gradle test

Steps to run using docker:

Docker Build

docker build -t createpreference:lts .

Docker Run

docker run -p 8080:8080 --init -e SPRING_PROFILES_ACTIVE='demo' --rm -d --name createpreference_service createpreference:lts

Run non detach

docker run -p 8080:8080 --init -e SPRING_PROFILES_ACTIVE='demo' --rm --name createpreference_service createpreference:lts

Check container logs

docker logs <image_name>
docker logs createpreference_service

Kill container

docker kill <container-id>
docker rm createpreference_service

How to test service

  • Run the service and access: Swagger
  • Install Postman or any rest client Install postman
  • Export this collection: Collection
  • eh voilà - The create preference microservice is ready to use

About

A sample microservice that is containerized using docker that performs a simple POST call to save data to DB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published