- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
@PreUpdate
@PrePersist
public void beforeUpdate() {
try {
throw new Exception("ORDER UPDATE");
} catch (Exception e) {
StackTraceElement[] trace =e.getStackTrace();
String stackTrace = "";
if(trace!=null) {
for (StackTraceElement element : trace) {
if(element.toString().contains("com.details")) {
stackTrace += ("\tat " + element + "\n");
}
}
}
logger.info("Trying to save/update :" + getDetails() + "\n ==>>> Trace:" + stackTrace);
}
}