You can try below strategy
- Introduce a new boolean field, based on which you will decide that you have to set auditing values manually or automatically.
- The new field will be @Transient, which will indicate that the field is not to be persisted.
- Write a CustomAuditingEntityListener that will extends the a AuditingListener class.
- In the custom listener you can override touhForCreate and touchForUpdate methods, as per your requirements.