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

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.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.