I'm using Spring Data Rest and have @RepositoryRestResource
defined with the path is "pathXYZ"
. Now I have a class with @RestController
and defined a @GetMapping
with "pathXYZ/custom"
.
It seems "pathXYZ/custom"
is not able to serve.
If I changed "pathXYZ/custom"
to "pathABC/custom"
, it is working as normal.
Is that the way to have @RestController
and @RespositoryRestResource
working on the same 'base' context path?
What you need is to annotate your MVC Controller with @RepositoryRestController instead of @RestController
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.