I have my WebService based on Spring 4, and I am using Hibernate Validator (beyond MethodValidationPostProcessor). My problem is that I have my ClientService interface, and its implementation. So I put Bean Validation constraints on the implementation and it forces me to put that constraints on the interface (throwing ConstraintDeclarationException) (or in both of them).
I want to know two things about this:
- Why does it work like this? Why does it force me to put all constraints on the interface? What is the reason?
- Is there any way to put the constraints only in the implementation?
Thanks in advance! Regards