Skip to content

Spring-Boot-Framework/spring-boot-microservices-best-practices

 
 

Repository files navigation

spring-boot-microservices-best-practices

Best Practices for Developing Rest-Based Microservices with Spring-Boot A service offers REST APIs for managing/consuming orders.

Owner

  • Ehab Qadah

Tools and Technologies Used

  • Spring Boot -2.4.0-SNAPSHOT

  • Maven

  • MYSQL

  • Swagger

  • Flywaydb

  • Hibernate 5

  • lighthouse-orm-commons

  • Docker and Docker Compose

Check out here for more details.

APIs documentation

LOCAL

Management APIs

actuator

Local MySql Setup

Setup a local mysql container:

Create local_user user and empty schema local_db by executing the following SQL commands:

CREATE USER IF NOT EXISTS  'local_user'@'%' IDENTIFIED BY 'P@ssword1';
CREATE DATABASE IF NOT EXISTS local_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON local_db.* TO 'local_user'@'%';

Docker Image

export IMAGE_NAME="<image-name>"
export GIT_COMMIT="<git-commit>"

docker build -t $IMAGE_NAME --build-arg GIT_COMMIT=$GIT_COMMIT  --build-arg ENVIRONMENT=local   .

Deployment

The micro-service can be deployed on a Kubernetes cluster using the DEPLOYMENT pipeline.

About

Best Practices for Developing Rest-Based Microservices with Spring-Boot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 94.9%
  • Dockerfile 5.1%