Spring Data Rest 存储库偶尔无法导出

Spring Data Rest repositories occasionally not exported

我在使用 Spring 数据恢复 (3.2.6.RELEASE) 的 Spring 启动应用程序 (2.2.6.RELEASE) 中遇到了一个奇怪的问题。有时我的存储库不会通过休息暴露出来。使用完全相同配置的我的应用程序的完全相同版本(相同 jar)会发生这种情况。

有 4 个 @RepositoryRestResource,当它工作时,根资源公开了这个:

{
    "_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"
        }
    }
}

当它不工作时 returns:

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

一些额外的发现:

其他人以前遇到过这个问题吗?这可能是什么原因造成的?或者关于如何进一步分析这个问题的一些指示?

听起来您 运行 喜欢 DATAREST-1502,它已在 3.2.7 和更新版本中修复。