I have two spring applications, the 1st app communicates with hibernate and the 2nd project communicates with elasticsearch, the data added by first project, then replicated from mysql to elasticsearch.
This data on elastic will be used in the 2nd spring application.
So, my question is the entities in first project for example have translation objects and it will be different objects each has details in one language, then we create a common project that contains these entities that will be used as maven dependency in both apps.
Does this way is correct or moving these entities into every project to do the differences since entities won't be exactly the same in both projects
If the classes are not exactly the same it doesn't make sense to share.
Sharing often results in a tight coupling between components and hinders the independent evolution of the components.