Spring Data Rest端点一段时间后消失 [英] Spring Data Rest Endpoints Disappear After A While
问题描述
我注意到在我的应用程序中,端点会在一段时间后消失,而没有任何关于原因的信息.示例:我昨晚启动了应用程序,今天早上我卷曲了端点并得到
I noticed that in my apps endpoints just disappear after a while without any information on why. Example: I started the application last night, this morning I curl the endpoint and get
curl -H "Content-type: application/json" http://localhost:8081
{
"_links" : {
"profile" : {
"href" : "http://localhost:8081/profile"
}
}
}
这是我重启服务后的样子:
This is what it looks like after I restarted the service:
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"
}
}
}
可靠地复制是非常困难的.大多数情况下,通过等待更长的时间,我能够再次看到这种行为.知道这里发生了什么吗?
It is super hard to reproduce reliably. Mostly, by waiting a longer period I was able to see this behavior again. Any ideas what's going on here?
推荐答案
我也遇到了这个问题,最终遇到了 https://jira.spring.io/browse/DATAREST-1505 描述了该问题.它已在最新版本的 springboot (2.2.7) 中得到修复,因此希望更新到该版本也能解决您的问题.
I've been having trouble with this too and eventually came across https://jira.spring.io/browse/DATAREST-1505 which describes the issue. It's been fixed in the latest version of springboot (2.2.7) so hopefully updating to that will fix your issue as well.
这篇关于Spring Data Rest端点一段时间后消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!