Introduce alias for 'value' attribute in @CookieValue

Issue: SPR-11393
This commit is contained in:
Sam Brannen
2015-05-31 15:58:51 +02:00
parent 845f4f2bb7
commit c4c3ce796a
6 changed files with 22 additions and 10 deletions

View File

@@ -1657,7 +1657,7 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl
@RequestMapping("/myPath2.do")
public void myHandle(@RequestParam("param1") String p1, @RequestParam("param2") int p2,
@RequestHeader("header1") long h1, @CookieValue("cookie1") Cookie c1,
@RequestHeader("header1") long h1, @CookieValue(name = "cookie1") Cookie c1,
HttpServletResponse response) throws IOException {
response.getWriter().write("test-" + p1 + "-" + p2 + "-" + h1 + "-" + c1.getValue());
}

View File

@@ -79,7 +79,7 @@ public class ServletCookieValueMethodArgumentResolverTests {
}
public void params(@CookieValue("name") Cookie cookie,
@CookieValue(value = "name", defaultValue = "bar") String cookieString) {
@CookieValue(name = "name", defaultValue = "bar") String cookieString) {
}
}