For the sake of simplicity, let's say that I have a class named "Dog".
Then I have two separated applications containing implementations of that class.
- Application "A" does something with the Dog class.
- Application "B" does another something with the Dog class.
Both applications require the Dog class, hence it would be duplicated.
Now let's say for a moment that:
- Those applications can't be merged into one.
- The implementations from "A" and "B" can't be moved into another application.
I'm using Spring Boot, if that info helps somehow.
Is there a way to fix the duplication of the Dog class?
CodePudding user response:
As @Slaw says you can create a jar/library then use any build tool like maven or gradle and package the jar/library in your archive file when it is built and here is a link for more info https://christianlydemann.com/a-guide-to-sharing-code-between-projects/