Wanted to know how is @Version
annotation in Spring Data REST put to use for ETags, I do not see the ETags populated for some reason
@Entity
@En
I faced the same problem and after hours and hours I realized the following things that led me to the enlightenment =P
In my case I was using Spring Boot 1.2.7 and whenever I installed the spring-boot-starter-data-rest dependency I ended up getting the Spring Data Rest 2.2.0 which don't has the ETag support. After upgrading Spring Boot in my project and reinstalled the dependencies my REST API started to retrieve the ETag header =D
With Spring Data JPA, you need to use @javax.persistence.Version
. @org.springframework.data.annotation.Version
is the annotation to use for other Spring Data modules.