I'm using the hibernate implementation of the javax.validation and would like to know how whether anyone has been able to apply the @NotNull constraint annotation to all fields of a class, rather than to each individual field?
I would prefer to enforce the @NotNull constraint as a default across my project, to avoid littering the code with @NotNull annotations on every field. Ideally it would be preferable to define a custom constraint "@MayBeNull" to annotated any fields that may be null.