Field values are not being modified on PreUpdate callback
问题 I've defined the following class as as default Entity Listener, so every time I call the persist() or merge() methods this code will be executed automatically: public class StringProcessorListener { @PrePersist @PreUpdate public void formatStrings(Object object) { try { for (Field f : object.getClass().getDeclaredFields()) { if (f.getType().equals(String.class)) { f.setAccessible(true); if (f.get(object) != null) { f.set(object, f.get(object).toString().toUpperCase()); } } } } catch