I am using spring data with mongodb to store binary data such as images etc I want to maintain a version field to append to the url to cheat the browser from caching images.
In order to use @Version annotation you need to enable auditing in Spring Data MongoDB by adding one line to your application context: