Most databases allow to have field with current timestamp (act as creation timestamp), for example in MySQL:
CREATE TABLE t (ts TIMESTAMP DEFAULT CURRENT_TIMESTA
This can be done as suggested by Simon, but it might be worth checking out a fuller solution.
Check out this Spring Roo Timestamp add-on. It adds 'created' and 'updated' timestamps to all entities marked with its annotation. https://github.com/rcaloras/spring-roo-addon-timestamp
(I created it, happy to answer questions or add additional features)