How to avoid cross dependency between layers because of @Constraint validatedBy?

后端 未结 2 1982
独厮守ぢ
独厮守ぢ 2021-01-04 22:56

In our project we have Service and DAO layers in separate Maven modules. Service module depends on DAO module and works with it\'s entities. The problem is that we can\'t pu

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-04 23:15

    You may use an XML based constraint mapping to assign a validator to your constraint to avoid the reference from the annotation to the validator implementation.

    The BV 1.1 EG is also discussing some improvements in that area. Feel free to weigh in on the issue on the mailing list.

提交回复
热议问题