0

我已经为 JPA 实体声明了 pagingandSortingRepository 并且对 findall() 的响应如下

"_embedded" : {
    "assetDashboardCustomers" : [ {
      "utilization" : "80",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/utilbycustomer/Customer01"
        },
        "assetDashboardCustomer" : {
          "href" : "http://localhost:8080/utilbycustomer/Customer01"
        }
      }
    },

我不想要 _links 和 self [HATEOAS] 详细信息,而只想要普通的 JSON。我应该设置什么属性才能在响应中获得纯 JSON

4

1 回答 1

0

The first comment answers your first question - you cannot turn off the links. The second comment answers you 2nd question which is how to have the ID in the JSON body.

--- 作者:Alan hay 在评论中

于 2016-11-07T09:20:57.930 回答