我使用Spring Data Rest读取亚马逊dynamodb的记录。除输出格式外,该服务工作正常。
我从服务中看到的输出是 -
---> HTTP GET
---> END HTTP (no body)
<--- HTTP 200 (1082ms)
: HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/hal+json
X-Application-Context: application
Server: Jetty(8.1.14.v20131031)
{"_links":{"search":{"href":"something"}},"_embedded":{"userInfoes":[{"id":"bde0ef42-30c2-4ccd-8b0f-44d718827f69","username":"dsds","password":"1234","highestscore":99,"_links":{"self":{"href":"something"}}}]}}
<--- END HTTP (291-byte body)
但我需要以下格式[没有额外的&#34; _embedded&#34;和&#34; _links&#34;标签存在]以轻松检索值。我在服务层使用改造。请帮忙!
[{"id":"bde0ef42-30c2-4ccd-8b0f-44d718827f69","username":"dsds","password":"1234","highestscore":99,}]