我可以在 UML 图中将多个组件分组在一个包内吗?

Can I group multiple components inside a package in UML Diagrams?

我需要将一个单一的应用程序拆分成多个子模块,某些模块如 util、exceptions、dto 等可以组合在一个模块中,即 commom。 Service、DAO、Controller 将是独立的模块。

我该如何实现。

我可以有一个包含 util、exception、dto、域组件的 Common 包,然后将 DAO、Controller、Service 作为单独的组件吗?

是的,这就是包的一般作用。

您可以创建一个包 Common,然后在其中包含子包(util、exceptions、dto 等)。然后你可以有单独的包,如 Service、DAO 和 Controller。