Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sarakhild/resttemplate-integration-microservices
This project simplify the RestTemplate with Spring Boot
https://github.com/sarakhild/resttemplate-integration-microservices
integration mysql resttemplate springboot
Last synced: about 2 months ago
JSON representation
This project simplify the RestTemplate with Spring Boot
- Host: GitHub
- URL: https://github.com/sarakhild/resttemplate-integration-microservices
- Owner: SaraKhild
- Created: 2024-01-04T11:16:34.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-03-11T22:05:46.000Z (10 months ago)
- Last Synced: 2024-03-12T21:31:31.233Z (9 months ago)
- Topics: integration, mysql, resttemplate, springboot
- Language: Java
- Homepage:
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Microservices Communication using RestTemplate
## Overview
In synchronous communication, the client sends a request and waits for a response from the service.And one of Synchronous Communication multiple Microservices is RestTemplate.
In this project, I have implemented department-service, user-service, and integration-service that communicate with these two Microservices. Besides that, I have separated the database for each Microservice.
## Usages
- Spring Boot
- Lombok
- RestTemplate
- MySQL
## Architecture of the Project
### 1-src folder
- User
- controller
- model
- dto
- objectmapper
- service
- repository
- Department
- controller
- model
- dto
- objectmapper
- service
- repository
- Integration
- client
- controller
- model
### 2-Maven pom.xml- User and Department pom.xml:
```
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-boot-starter-web
com.mysql
mysql-connector-j
runtime
org.projectlombok
lombok
true
org.springframework.boot
spring-boot-starter-test
test
```
- Integration pom.xml:
```
org.springframework.boot
spring-boot-starter-web
org.projectlombok
lombok
true
org.springframework.boot
spring-boot-starter-test
test
```
### 3- User Application.properties.yml
```
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3312/db
spring.datasource.username=db
spring.datasource.password=nFLhPPKOnkW1FA1e
spring.jpa.show-sql=trueserver.port = 8081
```
### 3- Department Application.properties.yml
```
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3312/db
spring.datasource.username=db
spring.datasource.password=nFLhPPKOnkW1FA1e
spring.jpa.show-sql=trueserver.port = 8080
```
### 3- Integration Application.properties.yml```
server.port = 8082```
###### Output :star_struck:
---
### Good Luck