【问题标题】:Spring Data Rest Endpoints Disappear After A WhileSpring Data Rest 端点在一段时间后消失
【发布时间】:2020-05-07 04:47:09
【问题描述】:

我注意到在我的应用程序中,端点会在一段时间后消失,而没有任何关于原因的信息。示例:我昨晚启动了应用程序,今天早上我 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"
    }
  }
}

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

【问题讨论】:

    标签: spring-data-rest


    【解决方案1】:

    我也遇到过这个问题,最终遇到了描述问题的https://jira.spring.io/browse/DATAREST-1505。它已在最新版本的 springboot (2.2.7) 中得到修复,因此希望更新到该版本也能解决您的问题。

    【讨论】:

    • 感谢您的链接!我会尝试升级 - 希望可以解决问题
    猜你喜欢
    • 1970-01-01
    • 2016-07-11
    • 2016-01-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-02
    相关资源
    最近更新 更多