-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handlermapping qualifier #267
Handlermapping qualifier #267
Conversation
<!-- Use the full path within the current servlet context to find an appropriate handler. | ||
s. http://docs.spring.io/spring/docs/4.0.7.RELEASE/spring-framework-reference/htmlsingle/#mvc-handlermapping --> | ||
<beans:bean id="handlerMapping" class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"> | ||
<beans:property name="alwaysUseFullPath" value="true"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed for the current archetype context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be useful for the more complex projects using multiple controllers in its context, but you're right, for the archetype that would be enough to use default config (alwaysUseFullPath=false
).
@@ -26,6 +26,7 @@ | |||
* method-level @RequestMapping annotations in @Controller classes. | |||
*/ | |||
@Autowired | |||
@Qualifier("handlerMapping") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename the qualifier to something more meaningful, e.g. requestHandlerMapping
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed in 5c2d27e
Thanks! Please merge! |
Thanks back, merging |
The recently introduced controller
EndpointDocController
for endpoint to retrieve all request mappings as JSON (#265) contains no unique@Qualifier
annotation forrequestMappingHandlerMapping
what can be conceivably fragile.This MR introduces
handlerMapping
bean inside of archetype servlet XML file and adds the corresponding qualifier to the controller mentioned above.Please review @chrismayer @terrestris/devs