| I see more and more projects start using code generators for their entities. Here are some libraries which generate java code:
- Immutables
- AutoValue
- FreeBuilder
They all seem to adopt direct name accessors instead of getters (from Java Beans): Example
public interface Entity {
@NotBlank
String name();
@Min(16)
int age();
}
It seem that hibernate validator still requires POJOs to follow java bean convention. Having standard getName() / getAge() works just fine. Is it currently possible to plug custom method name resolution with Validator ? |