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

Overview

spring-microservice

Demo microservice architecture with Spring ,Spring Cloud Gateway , Spring Cloud config server , Eureuka , keycloak and Docker. Architecture :

Architecture

Untitled Diagram drawio (1)

Install and run with docker

docker-compose up --build

Configure Keycloak

  1. Go to http://localhost:8080/auth/admin/ and connect with admin/admin
  2. Click on the clients menu from the left pane and choose spring-micro-gateway
  3. On the credentials tab , click on regenerate Secret button to generate secret for the spring-micro-gateway Client .
  4. Override the client-secret propertie under service api-gateway on the docker-compose.yml file
  5. from the me,u , click users to open the user list page .
  6. click add user and enter a name in the username field . Click on the credentials tab and set a password for the new user and disable the temporary flag.
  7. restart the api-gateway application docker-compose restart api-gateway

Fetch access token from the keycloak server

Via postman , Post a request to get an access token: POST http://localhost:18080/auth/realms/spring-micro-main/protocol/openid-connect/token&client_id=spring-micro-gateway&username= &password= &grant_type=password&client_secret=
Content-Type: application/x-www-form-urlencoded

Post a message with the producer microservice :

GET localhost:8080/api/produce/
Authorization: Bearer

Check microservice-consumer application logs , we had successfully send a message from producer to consumer via kafka.

TO BE CONTINUED ...

You might also like...

Hexagonal Architecture Demo Project about Ticketing and Payment

Hexagonal Architecture Demo Project about Ticketing and Payment

This project is a sample production-ready implementation for demonstrating the power of Hexagonal Architecture (aka Ports And Adapters Pattern) written in Java.

Jan 1, 2023

Custom Keycloak.X Server Distribution with selective features

Custom Keycloak Server Simple example for creating a custom Quarkus based Keycloak Distribution with 0 known CVEs. Features Create a custom Quarkus ba

Oct 19, 2022

mall-swarm是一套微服务商城系统,采用了 Spring Cloud Hoxton & Alibaba、Spring Boot 2.3、Oauth2、MyBatis、Docker、Elasticsearch、Kubernetes等核心技术,同时提供了基于Vue的管理后台方便快速搭建系统。mall-swarm在电商业务的基础集成了注册中心、配置中心、监控中心、网关等系统功能。文档齐全,附带全套Spring Cloud教程。

mall-swarm是一套微服务商城系统,采用了 Spring Cloud Hoxton & Alibaba、Spring Boot 2.3、Oauth2、MyBatis、Docker、Elasticsearch、Kubernetes等核心技术,同时提供了基于Vue的管理后台方便快速搭建系统。mall-swarm在电商业务的基础集成了注册中心、配置中心、监控中心、网关等系统功能。文档齐全,附带全套Spring Cloud教程。

mall-swarm 友情提示 快速体验项目:在线访问地址。 全套学习教程:《mall学习教程》。 Spring Cloud全套教程:《SpringCloud学习教程》。 专属学习路线:学习不走弯路,整理了套非常不错的《mall专属学习路线》。 项目交流:想要加群交流项目的朋友,可以加入mall项目

Jan 3, 2023

企业级 Spring Cloud Alibaba 微服务脚手架,nacos 配置中心、Oauth2认证与鉴权、Docker 容器化部署,开发环境一键式脚本安装,10分钟即可构建

企业级 Spring Cloud Alibaba 微服务脚手架,nacos 配置中心、Oauth2认证与鉴权、Docker 容器化部署,开发环境一键式脚本安装,10分钟即可构建

云龙 Cloud Dragon 适合于企业级别的微服务开发脚手架,功能齐全,开箱即用,部署快捷 目前项目处于开发阶段,部分功能已经可以使用,后续会逐步完成其他规划内容,并完善项目文档,如果你在使用过程中遇到任何问题,可以通过 QQ 群聊联系我,请戳这里 加入群聊。 📚 项目介绍 Cloud Dra

Dec 19, 2022

This repository shows how to natively extend Quarkus with a custom ConfigSource to use AWS AppConfig values when injecting config properties with @ConfigProperty.

Using AWS AppConfig in a custom MicroProfile ConfigSource This repository shows how to natively extend Quarkus with a custom ConfigSource to use AWS A

May 19, 2022

Config files for my GitHub profile.

- Board: Board function plays the most role in all classes of this Project ROLES: + initBoard(): used to display the score, the state of

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

Jan 6, 2023

Keycloak - an Open Source Identity and Access Management tool

Keycloak - an Open Source Identity and Access Management tool

Keycloak is an Open Source Identity and Access Management tool. You can use it to add authentication to applications and secure services with minimum effort. No need to deal with storing users or authenticating users.

Sep 20, 2022

An extension for Keycloak, that enables web-based sign in with Apple and token exchange

Apple Identity Provider for Keycloak 🍎 This repository represents an extension for Keycloak, which enables Sign in with Apple for web-based applicati

Dec 29, 2022
Owner
null
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
A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway, resillience4j, Kafka, Redis and MySQL.

High-availability-shopping-system A high availability shopping(ecommerce) system using SpringBoot, Spring Cloud, Eureka Server, Spring Cloud Gateway,

LeiH 1 Oct 26, 2022
DCL-350: Implementing MicroService Architecture using Spring Cloud

DCL-350: Implementing MicroService Architecture using Spring Cloud

Binnur KURT 3 Sep 20, 2022
Deploying Spring Boot and MongoDB as Containers Using Docker and Docker Compose

springboot-mongodb-docker Deploying Spring Boot and MongoDB as Containers Using Docker and Docker Compose Steps & Commands pull mongo image from docke

Java Techie 9 Nov 25, 2022
8INF138-TP3-SECURITY-DOCKER - Le docker du tp3 du cours 8INF138 de l'UQAC

?? TP3 - 8INF138 Ceci est le TP3 du module 8INF138 de l'Universite du Quebec a Chicoutimi Le rapport ce situe dans le depot Le travail visuel n'a pas

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

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

Java3y 2.9k Dec 31, 2022
Practice and testing with Java 11, Prometheus, and Spring-boot with MicroService Architecture. Designed to run on Kubernetes in minikube.

This application was written by Andrew Aslakson Built to run on minikube using kubernetes General race tracking system? Secure with Firebase Authentic

null 1 Feb 5, 2022
Sample Spring-Cloud-Api-Gateway Project of Spring Boot

Sample-Spring-Cloud-Api-Gateway Sample Spring-Cloud-Api-Gateway Project of Spring Boot Proejct Stack Spring Webflux Spring Cloud Gateway Spring Data R

Seokhyun 2 Jan 17, 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
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

Jean Jacques Nascimento Barros 3 Apr 23, 2022