Microservices and jpa

I like the idea of ​​microservices and I think that I understand the main idea.

I want to create a microservice system where each service is a separate spring-boot project. For example, with two services Service-Aand Service-B. B has some JPA objects and Amakes a request from RestTemplatebefore B.

RestTemplate.getForObject(...)The type of class that it should return is required. Therefore, I should also include object classes in Service-A(separate project) or is there a better way to send Object Values ​​to other services.

I hope I have explained my problem well enough.

+4
source share
1 answer

:

1) , . A B, lib-alpha, , lib- .. Java- ,

2) API , . ( XML, JSON ..) A , API,

+1

Source: https://habr.com/ru/post/1616072/


All Articles