wjans
wjans

Reputation: 10115

Spring Data Rest repositories occasionally not exported

I'm having a weird issue in my Spring Boot application (2.2.6.RELEASE) using Spring Data Rest (3.2.6.RELEASE). From time to time my repositories are not exposed via rest. This is happening with the exact same version (same jar) of my application using the exact same configuration.

There are 4 @RepositoryRestResource's and when it's working, the root resource exposes this:

{
    "_links": {
        "entity-a": {
            "href": "http://localhost:8080/api/entity-a{?projection}",
            "templated": true
        },
        "entity-b": {
            "href": "http://localhost:8080/api/entity-b"
        },
        "entity-c": {
            "href": "http://localhost:8080/api/entity-c{?page,size,sort,projection}",
            "templated": true
        },
        "entity-d": {
            "href": "http://localhost:8080/api/entity-d"
        },
        "profile": {
            "href": "http://localhost:8080/api/profile"
        }
    }
}

and when it's not working it returns:

{
    "_links": {
        "profile": {
            "href": "http://localhost:8080/api/profile"
        }
    }
}

Some additional findings:

Has anybody else experienced this issue before? What might be causing this? Or some pointers on how I can further analyse this problem?

Upvotes: 2

Views: 543

Answers (1)

Oliver Drotbohm
Oliver Drotbohm

Reputation: 83081

Sounds like you're running into DATAREST-1502 which has been fixed in 3.2.7 and newer.

Upvotes: 3

Related Questions