Open spring-projects-issues opened 6 years ago
Daniele Renda commented
Is this confirmed as a bug? Thanks
Oliver Drotbohm commented
No, it's not. You're implementing the controller and don't set any headers. I am wondering what exactly makes you expect the ETag to be set magically?
Daniele Renda commented
Thanks @Oliver
Gierke. I thought the magic happened because I was using @RepositoryRestController
. In the documentation (https://docs.spring.io/spring-data/rest/docs/current/reference/html/#customizing-sdr.overriding-sdr-response-handlers) is written "Sometimes you may want to write a custom handler for a specific resource. To take advantage of Spring Data REST’s settings, message converters, exception handling, and more..."
I thought that "and more" meant also this. Could you give me an hint to which Spring class to look at to take inspiration to set Etags like in Data REST Repositories? And if I may ask, why in Data REST repositories etag are set and here not?
Thanks
Daniele Renda commented
@olivergierke
Are you awaiting some feedback from me? I saw the change status but I didn't see any question. Thanks
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Daniele Renda opened DATAREST-1201 and commented
I'm using Spring Boot 1.5.10, Spring Data REST, Spring HEATEOAS, Spring HPA. I created a custom GET method in my
@RepositoryRestController
like this:Unfortunately, differently from the default Spring Data REST repository the Etag header is missing.
Am I missing something? Is this behaviour desired?
Affects: 3.0.3 (Kay SR3)