[JAVA] Making a Java Multi-Module
Last year, I joined the Scheduler service refactoring project at my company.
It was an opportunity to study Java Multi-Module, so I decided to publish about it.
1. Module
In the Oracle Java official documentation, a module is a union of packages.
It is also a reusable group that associates packages and resources.
At that time, each module could be developed, built, tested, and deployed independently.
2. Multi-Module
- A project with multiple modules is called a multi-module project
- It's common practice to split a project into smaller, interdependent modules
- In Gradle, a multi-project build is similar to a multi-module project
3. Why the "Multi-Module"
- Reduce human error when copying and pasting domains to different projects that work the same way.
So, we can ensure the same domain(or code) in used across different projects.
- It makes building project easier.
- We can easily understand the features about modules.
4. Caution
But if you overuse it, it causes highly dependent code.
So, we should be mindful when using this architectural approach.
<source>
https://techblog.woowahan.com/2637/