Auto-generating timestamps using AOP with Java 8 and Spring Data JPA
vrto
53

Nice approach, means you don’t have to do anything to your entities. I like it.

You can also customise (extend) AuditingHandler and implement your own markCreated and markModified. Which is also a good place to populate created by / modified by. Warning though: with this approach all 100 entities will need to have @EntityListeners(AuditingEntityListener.class).

example: https://github.com/macdao/customize-auditing-handler.