Skip to content

POC para conectar um api simples em uma api-gateway e se registrarem num service-registry

Notifications You must be signed in to change notification settings

pauloruszel/api-gateway-service-registry-simple-service-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 API Gateway, Service Registry e Simple Service API

Java Spring Boot Maven

POC de exemplo que demonstra a integração de um API Gateway, um Service Registry (Eureka) e um serviço simples usando Spring Boot e Spring Cloud.

Estrutura do Projeto

api-gateway-service-registry-simple-service-api

│
├── pom.xml
├── api-gateway
│ └── pom.xml
├── service-registry-api
│ └── pom.xml
└── simple-service-api
└── pom.xml

Pré-requisitos

Clonando o Repositório:

git clone https://github.com/pauloruszel/api-gateway-service-registry-simple-service-api.git

🛠️ Construindo o Projeto

cd api-gateway-service-registry-simple-service-api
mvn clean install
  1. Service Registry (Eureka)
mvn -pl service-registry-api spring-boot:run

✨ Acesse o Eureka Dashboard em http://localhost:8761

  1. Simple Service API
mvn -pl simple-service-api spring-boot:run
  1. API Gateway
   mvn -pl api-gateway spring-boot:run

✨ Acesse o serviço através do Gateway em http://localhost:8080/simple-service-api/hello

📁 Estrutura de Pastas

api-gateway-service-registry-simple-service-api
├── api-gateway
│   ├── src/main/java/com/br/api/gateway/ApiGatewayApplication.java
│   ├── src/main/resources/application.yml
│   └── pom.xml
├── service-registry-api
│   ├── src/main/java/com/br/service/registry/ServiceRegistryApplication.java
│   ├── src/main/resources/application.yml
│   └── pom.xml
└── simple-service-api
├── src/main/java/com/br/simple/service/SimpleServiceApplication.java
├── src/main/java/com/br/simple/service/HelloWorldController.java
├── src/main/resources/application.yml
└── pom.xml

✔️ Tecnologias e bibliotecas usadas

  • Java 17
  • Spring Boot 3.3
  • Spring Cloud 2023.0.2
  • Maven 3.6.3

Releases

No releases published

Packages

No packages published

Languages