它有助于将逻辑模型对象名称转换为物理名称,并允许检验数据对象,确保它们符合命名标准。
It facilitates the transformation of logical model object names into physical, and allows the users to validate their data objects to ensure their compliance with naming standards.
举例来说,让我们来考察一个控制器方法,它负责保存业务逻辑中的某一模型对象。
As an example, consider a controller method that manages saving a simple model object.
约束是定义在一个bean(领域对象)中的,因此校验逻辑离领域模型最近。
The constraints are defined in the bean (domain object) so the validation logic is close to the domain model.
应用推荐