Fix context-relative default value in XML parsing
This commit fixes the default value for the contextRelative attribute of a RedirectView, when this view is registered via a RedirectViewController in XML. The value is set to true. Note that the default value for this is correctly documented in spring-mvc-4.1.xsd. Also, the documentation and implementation for its javadoc counterpart also enforces true as a default value. Issue: SPR-12607
This commit is contained in:
@@ -140,6 +140,8 @@ class ViewControllerBeanDefinitionParser implements BeanDefinitionParser {
|
||||
}
|
||||
if (element.hasAttribute("context-relative")) {
|
||||
redirectView.getPropertyValues().add("contextRelative", element.getAttribute("context-relative"));
|
||||
} else {
|
||||
redirectView.getPropertyValues().add("contextRelative", true);
|
||||
}
|
||||
if (element.hasAttribute("keep-query-params")) {
|
||||
redirectView.getPropertyValues().add("propagateQueryParams", element.getAttribute("keep-query-params"));
|
||||
|
||||
Reference in New Issue
Block a user