gpt4 book ai didi

java - 大型 Maven 项目

转载 作者:行者123 更新时间:2023-11-30 11:02:42 25 4
gpt4 key购买 nike

我正在开发一个项目,它的环境在 eclipse 中初始化,并在 eclipse 中构建。项目的加载和运行不乏性能。我们决定在maven基础平台上迁移或环境。由于项目的子模块数量(大约 400 个子模块),项目的加载成为一场噩梦。那么遇到这种情况有什么解决办法呢?

最佳答案

根据您的开发环境的组织,按照以下方法之一将您的 400 模块项目分成更小的项目:

1)按业务领域划分

是否有可以视为独立的功能?例如。用户/访问控制、主数据管理、会计、报告等。如果有的话,这些都是单独项目的良好候选者。

示例:

+- your-application
+- commons
+- ... functionality/tools used by all others ...
+- access-control
+- ... access control modules ...
+- master-data
+- ... master data modules ...
+- accounting
+- ... accounting modules ...
+- reporting
+- ... reporting modules ...
+- ...
+ ...

2)按技术方面划分

您的“一个数据访问层、一个业务层和一个表示层”非常适合独立项目。

例子:

+- your-application
+- commons
+- ... functionality/tools used by all others ...
+- data-access
+- ... your data access modules ...
+- business
+- ... your business layer modules ...
+- presentation
+- ... your presentation layer modules ...

3)以上两者的结合

例子:

+- your-application
+- commons
+- ... functionality/tools used by all others ...
+- access-control
+- data-access
+- business
+- presentation
+- integration-tests
+- master-data
+- data-access
+- business
+- presentation
+- integration-tests
+- ...
+- accounting
+- data-access
+- business
+- presentation
+- integration-tests
+- ...
+- reporting
+- data-access
+- business
+- presentation
+- integration-tests
+- ...
+- ...
+ ...

关于java - 大型 Maven 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30681024/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com