Coming to HTTP conditional request, briefly, benefiting from the Etag and If-*, we can realize response cache(Etag+If-None-Match) and optimistic lock(Etag+If-Match).
As I see, it's convenient to perform the response cache using Spring which provides the specific filer ShallowEtagHeaderFilter to generate Etag value and check it against If-None-Match header. However, I cannot find corresponding components in Spring to do optimistic lock. Therefore, how can I implement that in Spring?
I had the same issue. Didn't find any native way in Spring to check it. But you can always extract the headers and do manual comparisons. For example (in Kotlin):