When using @AssertTrue in methods, the method is invoked 4 times during validation (Bean Validation)
问题 When using bean validation to validate the state of an object, the method annotated with @AssertTrue is called 4 times whenever the validation is invoked. It should only be called once per invocation. Hibernate-validator version: 5.1.3.Final Here is an example: For the following class Motorcycle: import javax.validation.constraints.AssertTrue; class Motorcycle{ private int fuel; private int tireDurability; @AssertTrue(message = "motorcycle.not.available.to.use") public boolean isAvailable(){