Spring data version annotation not incrementing when used on a mongo collection

前端 未结 1 408
礼貌的吻别
礼貌的吻别 2021-02-06 02:54

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.

相关标签:
1条回答
  • 2021-02-06 03:36

    In order to use @Version annotation you need to enable auditing in Spring Data MongoDB by adding one line to your application context:

    <mongo:auditing />
    
    0 讨论(0)
提交回复
热议问题