1. Significance of sub-module development
A module only does its own corresponding functions, improving development efficiency, splitting a project into several sub-modules to facilitate mutual calls, sharing interfaces, reducing coupling and improving code reuse.
2. Introductory case of sub-module development
Next, split the domain module from the current module.
Create a new maven project module
, name parentId name groupId artifactId and other information ,
import the coordinates in module 03 into the internal
maven project of module 02. If the maven project wants to run, it executes the life cycle operations in maven. It should be noted that to check whether the dependency is successful, you only need to run the compile command in the maven life cycle to check. After importing the coordinates of the 03 module into the 02 module, you need to execute the install command within the life cycle of the 03 module to download the module to the maven local warehouse, so that the 02 module can truly rely successfully, otherwise an error will be reported because the 03 module cannot be found.
3. Summary
The first step is to create a maven module.
The second step is to write the module code
. The third step is to install the module to the local warehouse through the maven command (install command)