1
I have doubts whether there are good practices for the distribution of entities between projects. Let’s say I have a java REST microservice that provides a client (id, name, address) through GET and another microservice that needs to consume this first microservice.
How could I avoid duplicating code between these two projects? Putting the client entity in a separate JAR and making the two microservices use this JAR as dependency? Have another way to minimize code duplication between these microservices in java?