Segmentation Engineering
Considering that our modules will become more and more, the public code and configuration we rely on need to be centrally managed, where we first split the public modules and configurations from the back-office management business.
Two new projects have been added, with the following structure:
kitty-boot: Initiator and global configuration module
Kitty-common: Public code module, mainly provides some tool classes
kitty-admin: Background Management system related business module
1. Kitty-common
Create a new Maven project Kitty-common to store the following public code, temporarily empty.
2. Kitty-boot
Copy the original kitty-admin, change the name Kitty-boot.
Modify the package name, Kitty.admin-Kitty.boot.
Clean up the background business code, leaving only the startup classes and configuration files.
Modify the class name, Kittyadminapplication->kittyapplication.
Join the dependency on Kitty-common and Kitty-admin
3. Kitty-admin
Clears the initiator class and the associated configuration file.
Clean up the configuration and add Kitty-common dependencies.
Compile run
Project Segmentation finished, recompile kitty-boot, if the report Kitty-common, Kitty-admin jar package does not exist error, first Kitty-common, Kitty-admin Jar compiled one by one.
Run Kittyapplication, after the successful start, access to the previous interface is normal, project segmentation is completed.
The rain recalls the light dust
Source: https://www.cnblogs.com/xifengxiaoma/
All rights reserved, welcome reprint, Reprint please indicate the original author and source.
Java Backend Management System (V): Modular Segmentation