Open spring-projects-issues opened 8 years ago
Oliver Drotbohm commented
Spring Data REST's RepositoryRestHandlerMapping
is deploy after the plain Spring MVC one to allow overriding Spring Data REST resources manually. You can react to missing handler mappings using an appropriate exception handler
Aurélien Leboulanger commented
Does any by-pass exist before this issue can be done ? I have the same use case which is to set the spring data rest mapping order before the spring mvc.
Petar Tahchiev opened DATAREST-896 and commented
As indicated here
https://github.com/spring-projects/spring-boot/blob/master/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointHandlerMapping.java#L85
the
RequestMappingHandlerMapping
has order 0.At the moment
DelegatingHandlerMapping
is registered withOrdered.LOWEST_PRECEDENCE - 100;
so it is always afterRequestMappingHandlerMapping
. In a typical spring-boot application I would love to be able to configure the order. The best combination in my oppinion would be:but at the moment it is like this:
In my application I have a
DefaultController
which always kicks in if there's no controller mapping, so I never get to the REST handler mapping.Affects: 2.5.2 (Hopper SR2), 2.6 M1 (Ingalls)
3 votes, 6 watchers