spring-data-rest - Spring Data Rest 端点在一段时间后消失
问题描述
我注意到在我的应用程序中,端点会在一段时间后消失,而没有任何关于原因的信息。示例:我昨晚启动了应用程序,今天早上我 curl 端点并得到
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"
}
}
}
很难可靠地复制。大多数情况下,通过等待更长的时间,我能够再次看到这种行为。有什么想法吗?
解决方案
我也遇到了麻烦,最终遇到了描述该问题的https://jira.spring.io/browse/DATAREST-1505 。它已在最新版本的 springboot (2.2.7) 中得到修复,因此希望更新到该版本也能解决您的问题。
推荐阅读
- docker - 将 Nexus 2 数据迁移到 dockerized nexus 3
- tsql - 将 SQL Server RDS 数据库的完整事务日志备份到 S3 存储桶
- python - 如何分配共享内存,以便父进程可以看到子进程中的写入?
- ansible - 如何设置ansible配置变量运行时间
- android - 如何在 SQL 查询中使用扫描的变量(条形码)
- reactjs - 在 React 中使用数组参数查询 API
- amazon-web-services - Kubernetes KOPS 集群创建问题 - 读取集群配置时出错
- digital-ocean - 生成 SSL 证书以将 db 连接到数据工作室
- powershell - 无法使用 PowerShell 将 Azure 驱动器存储映射为网络驱动器
- excel - 计算计费小时数和超出小时数为空