Example project of Spring Boot Microservices with the following services School and Student

Overview

SpringBootMicroservicesWithDiscoveryGatewayConfig

Example project of Spring Boot Microservices with the following services School and Student, additionally there is Eureka Discovery Service, API Gateway and Config Server, and Hystrix Circuti Breaker

  • Updated with SpringDoc and Postman test collection

Circuit breaker: it monitors connections to services and falls back if the connection (service) is down

Additional steps to without Config server: Git repo config-server with application.properties files containing the following common configuration for services:

eureka.client.register-with-eureka=true eureka.client.fetch-registry=true eureka.client.service-url.defaultZone=http://localhost:8761/eureka/ eureka.client.instance.hostname=localhost

Then bootstrap.properties added to the services (student, school, gateway), as it is called first, before application.properties. It contains: spring.cloud.config.enabled=true spring.cloud.config.uri=http://localhost:8083 (this is the cloud-config-server address)

Try it out:

Postman collection updated, so you can load it into Postman and run.

Manually in browser:

With Postman for example: Post: http://localhost:8099/schools/ Body: { "id":"1", "name":"School1" }

Get: http://localhost:8099/schools/1 This will give back the school 1 { id: 1, name: "School1"}

Post: http://localhost:8099/students/ Body: { "id":"1", "name":"Joe", "schoolId":"1" }

Get: http://localhost:8099/students/1 This will give back the student 1 with the related school { "student": { "id": 1, "name": "Joe", "schoolId": 1 }, "school": { "id": 1, "name": "School1" } }

SpringDoc: http://localhost:8081/v3/api-docs http://localhost:8082/v3/api-docs http://localhost:8081/swagger-ui/index.html http://localhost:8082/swagger-ui/index.html

You might also like...

Spring Boot JdbcTemplate example with SQL Server: CRUD Rest API using Spring Data JDBC, Spring Web MVC

Spring Boot JdbcTemplate example with SQL Server: Build CRUD Rest API Build a Spring Boot CRUD Rest API example that uses Spring Data Jdbc to make CRU

Dec 20, 2022

Spring Boot JWT Authentication example with Spring Security & Spring Data JPA

Spring Boot JWT Authentication example with Spring Security & Spring Data JPA

Jan 26, 2022

This project contains a full example of an application developed using Spring Boot and GraphQL within the Java.

Spring boot GraphQL Example This project contains a full example of an application developed using GraphQL within the Java. The project includes a com

Jul 20, 2022

Swerve control, simulation, and trajectory generation / following. Everything you need for swerve.

BearSwerve BearSwerve is intended to be an all in one swerve solution including: teleop driving, simulation, trajectory following and more. It combine

Dec 28, 2022

Spring JPA Many To Many example with Hibernate and Spring Boot CRUD Rest API - ManyToMany annotation

Spring JPA Many To Many example with Hibernate and Spring Boot CRUD Rest API - ManyToMany annotation

Dec 28, 2022

This is an example of how conditional events can be triggered in Camunda using a simple spring boot project

This is an example of how conditional events can be triggered in Camunda using a simple spring boot project

Camunda Conditional Events Example This example is a Spring Boot Application using Camunda. In this example i'll show a variety of ways that BPMN's Co

Sep 30, 2021

Spring Boot Project Example by Evren Tan

A Complete Spring Boot Example Project A Complete Spring Boot Example Project with Spring Boot 2.6.2, JDK 17 & Maven. Table of Contents How to Contrib

Nov 28, 2022

Project Basics Example using Spring Boot 3.0

Base Project Spring 3.0 Exaples of the acess - API localhost Method create - POST Content-Type =

May 9, 2022

This module explains about the example of Spring MVC + Database Integration with MySQL using Hibernate ORM with practical coding example and required JAR dependencies

SpringMVC-Database-Integration This module explains about the example of Spring MVC + Database Integration with MySQL using Hibernate ORM with practic

Nov 2, 2021
Owner
Gábor Hutya
Java Developer
Gábor Hutya
Web-based restaurant management system with spring boot and rest API for school final-year project.

Restaurant Management System Developing this for my school as first final year project. It shall be able to handle most of the challanges that encount

Taha Dönük 4 Mar 10, 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
循序渐进,学习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
Spring Boot Security Login example with JWT and H2 example

Spring Boot Security Login example with JWT and H2 example Appropriate Flow for User Login and Registration with JWT and HttpOnly Cookie Spring Boot R

null 50 Dec 21, 2022
Zitadel.ch Example Project with Spring Boot and Spring Security

Zitadel Example Project with Spring Boot and Spring Security This example contains two Spring Boot Apps (app and api) which use the Zitadel IdP as Ope

Thomas Darimont 2 May 3, 2022
Microservices with Spring Boot and Kafka Demo Project

Example microservices showing how to use Kafka and Kafka Streams with Spring Boot on the example of distributed transactions implementations with the SAGA pattern

Piotr Mińkowski 98 Jan 7, 2023
Final project of my Computer Science major in high school

BattleShips Final project of my Computer Science major in high school. I've coded an android app (in Java) in which users can play the game "Battle Sh

null 3 Jul 28, 2021
Spring Boot & MongoDB Login and Registration example with JWT, Spring Security, Spring Data MongoDB

Spring Boot Login and Registration example with MongoDB Build a Spring Boot Auth with HttpOnly Cookie, JWT, Spring Security and Spring Data MongoDB. Y

null 15 Dec 30, 2022
Spring Boot microservices app with Spring Cloud, Robust and resilient backend managing e-Commerce app

e-Commerce-boot μServices Important Note: This project's new milestone is to move The whole system to work on Kubernetes, so stay tuned. Introduction

Selim Horri 65 Dec 23, 2022
A simple blog post api made with spring,mysql.Following tutorial by @FadatareRamesh(Java Guides)

blogAPI A simple blog post api made with spring,mysql.Following tutorial by @FadatareRamesh(Java Guides) Frontend server(made using Angular) can be fo

null 1 Feb 2, 2022