How to avoid cross dependency between layers because of @Constraint validatedBy?
问题 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 put custom jsr 303 constraint which uses some services from service layer in DAO entity because that would create the back reference from DAO layer to service layer, because the validator class needs to be referenced in validatedBy attribute of custom @Constraint. Is there a way (using standard jsr 303 api) to specify