How to change the property name of an embbed collection in Spring Hateos

你。 提交于 2019-12-05 19:42:33

Just have a look here: http://docs.spring.io/spring-hateoas/docs/0.19.0.RELEASE/reference/html/#spis.rel-provider

What you are seeing is the default. If you put the EVO inflector on the classpath you will get something like "types". You can also put the @Relation annotation on your entity and change the rel names for collection and single resource.

@RepositoryRestResource(path = "somePath",collectionResourceRel="proper_list_of_items_name")

String collectionResourceRel() default "";

The rel value to use when generating links to the collection resource.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!