Pergunta

I have problem with Spring-DATA-REST. I allready posted in the spring forum but got no answer. Maybe here someone can help?

I have a test application set up with Spring-DATA-REST and all my domain objects get exposed by spring data rest.

Now: If I access my files repository under the uri /files/ I get a list of files I just created.

But: If I then access one of the files with the direct uri /files/{id}, for example /files/1 I get data from a file I entered long ago. I can't explain where this data comes from...

I just checked the JpaRepository. That is ok and I get the same data from a file retrieved with:

JpaRepository.findAll().get(0) as from jpaRepository.findOne(JpaRepository.getAll().get(0).getId())

Is there some cache in spring data rest, that could still have the old data?

I am really desperate. Anyone has an idea on how to get my new data with spring data rest?

Foi útil?

Solução

I assume that you are using HTTP as a transfer layer. If yes then you should look at HTTP cache headers in response. The result may be cached somewhere between. You may use:

curl -vvl uri/files/{id}

to see all response's headers.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top