Introduce alias for 'value' attribute in @MatrixVariable
Issue: SPR-11393
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -152,7 +152,7 @@ public class MatrixVariablesMethodArgumentResolverTests {
|
||||
public void handle(
|
||||
String stringArg,
|
||||
@MatrixVariable List<String> colors,
|
||||
@MatrixVariable(value="year", pathVar="cars", required=false, defaultValue="2013") int preferredYear) {
|
||||
@MatrixVariable(name = "year", pathVar = "cars", required = false, defaultValue = "2013") int preferredYear) {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -397,8 +397,8 @@ public class UriTemplateServletAnnotationControllerHandlerMethodTests extends Ab
|
||||
public void handle(@PathVariable("hotel") String hotel,
|
||||
@PathVariable int booking,
|
||||
@PathVariable String other,
|
||||
@MatrixVariable(value="q", pathVar="hotel") int qHotel,
|
||||
@MatrixVariable(value="q", pathVar="other") int qOther,
|
||||
@MatrixVariable(name = "q", pathVar = "hotel") int qHotel,
|
||||
@MatrixVariable(name = "q", pathVar = "other") int qOther,
|
||||
Writer writer) throws IOException {
|
||||
assertEquals("Invalid path variable value", "42", hotel);
|
||||
assertEquals("Invalid path variable value", 21, booking);
|
||||
|
||||
Reference in New Issue
Block a user