Practice and testing with Java 11, Prometheus, and Spring-boot with MicroService Architecture. Designed to run on Kubernetes in minikube.

Overview

This application was written by Andrew Aslakson

  • Built to run on minikube using kubernetes

  • General race tracking system?

  • Secure with Firebase Authentication?

  • Build React app too? - realistically probably just postman.


Tech Stack

  • Java 11
  • Maven
  • Spring-Boot
  • Prometheus
  • Jacoco
  • Lombok

Running Instructions

  • tests "mvn clean test -Dspring.profiles.active=test"
    • this generates jacoco reports and runs all Unit and Integration tests
    • test profile uses H2 database, and populates it with 5 test users
  • Running: because tests have special configuration
    • package with "mvn clean package -Dmaven.test.skip"
      • default package is set to "local"
    • package with: "mvn clean package -Dmaven.test.skip"
      • !Not implemented!
    • run with "mvn spring-boot:run -Dspring.profile.active=dev"
  • local Environment: Uses h2 database, used while developing
  • Dev Environment: meant to be for kubernetes, most likely connects to DB hosted on kubernetes
    • Not yet actually configured
  • h2-console: configured to be at: "localhost:5000/h2-console", URL: "jdbc:h2:mem:local"
    • Username: admin
    • password: password
  • Prometheus Statistics: reached at: "localhost:5000/actuator/prometheus"

Database Structure

Database Diagram


Production History


02-04-2022

  • Initialized Project
  • Created Git Repository
  • Added POM dependencies
  • Created Driver class (Just starts Spring Boot Application)
  • Added ERD Documentation
  • Refactored to just be UserService
  • Added Basic CRUD operations


02-08-2022

  • Finished MetricsAspect
  • Finished LoggingAspect
  • Added more Exceptions to Exception Handler
  • h2-console and prometheus metrics are available on endpoints


02-09-2022

  • Added Unit Testing For Service Layer Logic
  • Did a lot more reconfiguring of things today


02-10-2022

  • Added integration testing
  • finished configuring local and test profiles
  • Changed UserId to be GenerationStrategy.IDENTITY
  • Finalized project, cleaned code
  • Massive project reorganization

You might also like...

Clean-architecture-guide - Guia sobre Clean Architecture criado a partir dos meus estudos sobre o tema.

Clean-architecture-guide - Guia sobre Clean Architecture criado a partir dos meus estudos sobre o tema.

Clean Architecture Guide Arquitetura são as práticas e fundamentos de como organizamos um sistema. Tem relação e como os componentes estão relacionado

Apr 23, 2022

Hi, Spring fans! We're going to learn how to build Kubernetes operators, CRDs, and controllers

Bootiful Kubernetes Operators Make sure youre in the default namespace of a Kubernetes cluster. Not sure fi this matters but I am, so it might help. T

Dec 29, 2022

Spring prometheus grafana

Spring prometheus grafana

spring-prometheus-grafana For correct operation it is necessary to make some steps: 1- Run the command docker-compose up -d --build in the terminal: 2

Jan 25, 2022

Docker Compose Spring,Resilience4j,Prometheus,Grafana

Docker Compose Spring,Resilience4j,Prometheus,Grafana

Docker Compose Spring,Resilience4j,Prometheus,Grafana ( Circuit Breaker pattern - Retry pattern - Ratelimiter pattern - Timelimiter pattern - Bulkhead pattern )

Mar 27, 2022

A sample microservice built with Spring Boot and Gradle.

Project Overview A sample microservice built with Spring Boot and Gradle. There are APIs built using REST and the resource is bicycle. All CRUD operat

Feb 2, 2022

A code sharing platform built using spring boot, hibernate and JPA as ORM with PostgreSQL which also follows a RESTful architecture.

Snap-Snippet A code sharing platform built using spring boot, hibernate and JPA as ORM with PostgreSQL which also follows a RESTful architecture. Tech

Nov 29, 2022

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login example with Spring Security, MySQL and JWT Appropriate Flow for User Login and Registration with JWT Spring Boot Rest Api Architect

Jan 5, 2023

Spring Boot Clean Architecture - Iran Plate

Spring Boot Clean Architecture - Iran Plate

Spring Boot Clean Architecture Sample Iran Plate Location Finder I used the Clean Architecture in my project. In this method we can develop our projec

Jul 6, 2022

消息推送平台 - 所使用的技术栈包括:SpringBoot、SpringDataJPA、MySQL、Docker、docker-compose、Kafka、Redis、Apollo、prometheus、Grafana、GrayLog等等

消息推送平台 - 所使用的技术栈包括:SpringBoot、SpringDataJPA、MySQL、Docker、docker-compose、Kafka、Redis、Apollo、prometheus、Grafana、GrayLog等等

项目介绍 austin项目核心功能:发送消息 项目出现意义:只要公司内有发送消息的需求,都应该要有类似austin的项目,对各类消息进行统一发送处理。这有利于对功能的收拢,以及提高业务需求开发的效率 系统项目架构 austin项目核心流程:austin-api接收到发送消息请求,直接将请求进MQ。a

Dec 31, 2022
Owner
null
Demo microservice architecture with Spring ,Spring Cloud Gateway , Spring Cloud config server , Eureuka , keycloak and Docker.

spring-microservice Demo microservice architecture with Spring ,Spring Cloud Gateway , Spring Cloud config server , Eureuka , keycloak and Docker. Arc

null 4 Sep 13, 2022
该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的线上博客项目/企业大型商城系统/前后端分离实践项目等,摆脱各种 hello world 入门案例的束缚,真正的掌握 Spring Boot 开发。

Spring Boot Projects 该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的前

十三 4.5k Dec 30, 2022
Java-Programs---For-Practice is one of the Java Programming Practice Series By Shaikh Minhaj ( minhaj-313 ). This Series will help you to level up your Programming Skills. This Java Programs are very much helpful for Beginners.

Java-Programs---For-Practice is one of the Java Programming Practice Series By Shaikh Minhaj ( minhaj-313 ). This Series will help you to level up your Programming Skills. This Java Programs are very much helpful for Beginners. If You Have any doubt or query you can ask me here or you can also ask me on My LinkedIn Profile

Shaikh Minhaj 3 Nov 8, 2022
CRUD operation using java springboot microservice hosted in kubernetes env, data stored in mongodb

springboot-mongodb-k8s-parth Brief Introduction Hello Friends, I have created REST API using Springboot and Spring cloud application which performs CR

Parth Shah 1 Nov 11, 2021
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
helm、kubernetes、spring boot、java

建立好 K8s 後需要再 /etc/default/kubelet 新增 --node-ip 的字段其值為當前主機的 IP 在 deployment/kubernetes 下使用 kubectl apply -f . 即可運行服務 Helm Initialize a Helm Chart Repos

CCHong 3 Mar 5, 2022
DCL-350: Implementing MicroService Architecture using Spring Cloud

DCL-350: Implementing MicroService Architecture using Spring Cloud

Binnur KURT 3 Sep 20, 2022
参考 DDD/Clean Architecture 设计理念,整合 Spring Boot/Spring Security/Mybatis Plus/Vavr 的 Spring Realworld 应用案例

Demo · 更多项目 · 参考资料 ms-spring-ddd-examples Unified Domain-driven Layered Architecture for MicroService Apps,试图探索一套切实可行的应用架构规范,可以复制、可以理解、可以落地、可以控制复杂性的指导

王下邀月熊 19 Sep 23, 2022
Restaurant Management Project with Microservice Architecture by Evren Tan

Restaurant Management Restaurant Management Project with Microservice Architecture is developed by Evren Tan. Table of Contents Modules Cloud Config S

Evren Tan 26 Dec 11, 2022
Spring boot microservice example with Eureka Server + Eureka Client + Spring Cloud API Gateway + OAuth2.0 + Circuit Breaker + Resilience4J + FeignClient + RestTemplate

Spring boot microservice example Spring boot microservice example with Eureka Server + Eureka Client + Spring Cloud API Gateway + OAuth2.0 + Circuit B

Subhash Lamba 47 Dec 29, 2022