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

前端 未结 1 409
礼貌的吻别
礼貌的吻别 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:

    
    

    0 讨论(0)
提交回复
热议问题