Sign inSign up

arafkarsh/ms-vanilla-service

By arafkarsh

•Updated over 1 year ago

Java 23, SpringBoot 3.4.1 NFR Examples

Image
Developer tools
0

769

arafkarsh/ms-vanilla-service repository overview

⁠Cloud-Native Architecture / Microservices Template

  • Java 23 (Minimum Requirement Java 17)
  • SpringBoot 3.4.1
  • Jakarta EE 10

Cloud-native (or microservice) architecture is an approach to application design in which software is broken down into small, independent services that communicate through lightweight APIs, enabling more agile development, scalability, and resilience. Rather than running a single monolithic codebase, each microservice can be developed, deployed, and scaled independently.

This decomposition—often containerized and orchestrated using tools such as Kubernetes—allows teams to quickly iterate on features, take advantage of cloud-native capabilities (like auto-scaling and automated deployments), and release updates with minimal disruption to the entire system. According to the Cloud Native Computing Foundation (CNCF), this approach fosters loosely coupled systems that are resilient, manageable, and observable, combined with robust automation (CNCF, 2023).

Key Features of Microservice (Sources: CNCF, 2023; Fowler, 2014):

  • Service Independence: Each microservice is autonomous, allowing for separate development, deployment, and scaling without affecting others.
  • Containerization: Services are commonly packaged in containers (e.g., Docker), providing consistency across different environments and efficient resource utilization.
  • Lightweight Communication: Microservices communicate via lightweight protocols (often HTTP/REST or gRPC), reducing overhead and complexity.
  • Scalability: Independent scaling of services ensures you can allocate resources exactly where needed, improving performance and cost-efficiency.
  • Continuous Delivery and Deployment: Automation enables frequent, reliable releases to production while minimizing disruption.
  • Resilience: Failure of one service doesn’t necessarily bring the entire system down, as microservices are loosely coupled and can handle faults gracefully.

Checkout the GitHub Source Code Repository: https://github.com/arafkarsh/ms-springboot-vanilla⁠

⁠What the Template Provides out of the box

  • Security Auth/Authorization using AOP and Filters
  • Exception Handling with Exception Framework using AOP ( ..microservice.adapters.aop)
  • Log Management using AOP (json and text formats) using Logback (...adapters.filters)
  • Standardized REST Responses (...domain.models.StandardResponse)
  • Security using JWT Tokens / KeyCloak Auth (...microservice.adapters.security, ...microservice.security)
  • Encrypting Sensitive Data using Encryption Algorithms (...microservice.security)
  • JPA configurations for H2 and PostgreSQL (...server.config)
  • Observability Using Micrometer, Prometheus and Open Telemetry.
  • Database Password Encryption using Jasypt. Check out the shell programs encrypt and decrypt.
  • Digital Signatures using Standard Java Cryptography.
  • Open API-based Swagger API Docs (...microservice.adapters.controllers)

⁠How to run the container

docker container run -it --network="host" --name $SERVICE-$VERSION --rm -p $PORT:9334 \
        -e JASYPT_ENCRYPTOR_PASSWORD=${JASYPT_ENCRYPTOR_PASSWORD} \
        -e APP_PROFILE=$APP_PROFILE \
        -e SPRING_PROFILES_ACTIVE=$APP_PROFILE \
        -e SPRING_DATASOURCE_URL=jdbc:postgresql://host.docker.internal:5433/ms_vanilla_334 \
        $FULL_NAME

Tag summary

Content type

Image

Digest

sha256:fe96c7e16…

Size

204.7 MB

Last updated

over 1 year ago

docker pull arafkarsh/ms-vanilla-service:0.3.4-alpaquita-21-k8s