JUnit for RestController with parameter PersistentEntityResourceAssembler

前端 未结 2 907
执念已碎
执念已碎 2021-01-25 00:52

could you please help me.

I try to implement an JUnit-Test for a Restcontroller with parameter PersistentEntityResourceAssembler.

Here is my RestController:

2条回答
  •  情歌与酒
    2021-01-25 01:12

    From your controller method I don't see if you are using PersistentEntityResourceAssembler. Please check your use case. To fix this, in your controller, you can use @RepositoryRestController instead of @RestController. Please check http://docs.spring.io/spring-data/rest/docs/current/reference/html/#customizing-sdr.overriding-sdr-response-handlers. I found the similar issue has been reported for some different use case. This issue is still in open state. https://jira.spring.io/browse/DATAREST-657

提交回复
热议问题