JPA
There isn’t anything as convenient as annotating the Timestamp field directly but you could use the @PrePersist, @PreUpdate annotations and with little effort achieve the same results.
Hibernate
@CreationTimestamp– Documentation@UpdateTimestamp– Documentation
Spring Data JPA
@CreatedDate– Documentation@LastModifiedDate– Documentation