Spring Data Rest端点在一段时间后消失

问题描述 投票:0回答:1

[我注意到,在我的应用中,端点仅在一段时间后消失,而没有关于原因的任何信息。示例:我昨晚启动了应用程序,今天早上我卷曲端点并得到

curl -H "Content-type: application/json" http://localhost:8081
{
  "_links" : {
    "profile" : {
      "href" : "http://localhost:8081/profile"
    }
  }
}

这是重新启动服务后的样子:

curl -H "Content-type: application/json" http://localhost:8081
{
  "_links" : {
    "roleAssignments" : {
      "href" : "http://localhost:8081/roleAssignments"
    },
    "invitations" : {
      "href" : "http://localhost:8081/invitations"
    },
    "tenantProfiles" : {
      "href" : "http://localhost:8081/tenantProfiles"
    },
    "roles" : {
      "href" : "http://localhost:8081/roles"
    },
    "companies" : {
      "href" : "http://localhost:8081/companies"
    },
    "permissions" : {
      "href" : "http://localhost:8081/permissions"
    },
    "accounts" : {
      "href" : "http://localhost:8081/accounts"
    },
    "profile" : {
      "href" : "http://localhost:8081/profile"
    }
  }
}

很难可靠地复制。通常,通过等待更长的时间,我能够再次看到这种行为。有什么想法吗?

spring-data-rest
1个回答
0
投票

我也一直在遇到麻烦,最终遇到了描述问题的https://jira.spring.io/browse/DATAREST-1505。它已在最新版本的springboot(2.2.7)中得到修复,因此希望对其进行更新也将解决您的问题。

© www.soinside.com 2019 - 2024. All rights reserved.