It is also worth considering that findMergedAnnotation is a performance-heavy method, so should cache getting annotations or come up with something so as not to use annotation search for each parameter field in each call request
@Override
public String getFieldName() {
Field annotationField = AnnotatedElementUtils.findMergedAnnotation(getField(), Field.class);
if (annotationField != null && StringUtils.hasText(annotationField.value())) {
return annotationField.value();
}
return fieldNamingStrategy.getFieldName(this);
}
Now it doesn't work like that, see the test here: https://github.com/tarantool/cartridge-springdata/pull/87
It is also worth considering that findMergedAnnotation is a performance-heavy method, so should cache getting annotations or come up with something so as not to use annotation search for each parameter field in each call request