Java @jsonRootName不适用于spring启动程序hateoas

Java @jsonRootName不适用于spring启动程序hateoas,java,spring,spring-mvc,spring-boot,spring-hateoas,Java,Spring,Spring Mvc,Spring Boot,Spring Hateoas,我正在使用SpringBoot和SpringHateoas开发一个rest应用程序。我写的DTO是: java @JsonIgnoreProperties(ignoreUnknown = true) @JsonRootName("bills") public class Bill{ 从属关系: dependencies { compile "org.springframework.boot:spring-boot-starter-hateoas" compile "org.springfram

我正在使用SpringBoot和SpringHateoas开发一个rest应用程序。我写的DTO是:

java

@JsonIgnoreProperties(ignoreUnknown = true)
@JsonRootName("bills")
public class Bill{
从属关系:

dependencies {
compile "org.springframework.boot:spring-boot-starter-hateoas"
compile "org.springframework.boot:spring-boot-starter-ws"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.cloud:spring-cloud-starter-eureka:${springCloudVersion}"

testCompile("org.springframework.boot:spring-boot-starter-test")
}
Application.java:

@Configuration
@Import(BillServiceConfig.class)
@EnableAutoConfiguration
@EnableEurekaClient
@ComponentScan({"com.billing"})
@EnableWebMvc
@EnableHypermediaSupport(type = EnableHypermediaSupport.HypermediaType.HAL)
public class Application {
BillController.java:

 @RequestMapping(method = RequestMethod.GET, value = "")
 public ResponseEntity<Resources<Resource<Bill>>> getBills(@PathVariable String billUid)

这里的json根名称是BillList。但我需要的是“账单”而不是“账单清单”。在这个问题上谁能帮忙。提前感谢。

嵌入的
子句中的键实际上是关系名。因此,它们是通过springhateoas中的
RelProvider
抽象获得的。自定义它们的最简单方法是使用
@Relation
注释域类型,并定义项目和集合关系所需的关系名称


要获得
\u embedded
子句中使用的正确复数,一个简单的方法是将Evo Incomector JAR添加到您的类路径中,如文档所述。

我正在寻找一个示例,说明如何使用
@Relation
注释和Evo Incomector JAR在我的响应中正确设置
\u embedded
子句。你知道有什么例子说明如何做到这一点吗?
`_embedded: {
BillList:
{`