Servlet/PortletResponse supported as a resolvable dependency now (in particular for web controllers)

This feature required support for response exposure on Servlet/PortletRequestAttributes, instead of just in the Servlet/PortletWebRequest subclasses.

Issue: SPR-11795
This commit is contained in:
Juergen Hoeller
2014-05-16 18:06:29 +02:00
parent 5faacd5a3d
commit ea88bc2c81
11 changed files with 138 additions and 67 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 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.
@@ -1023,7 +1023,7 @@ public abstract class FrameworkServlet extends HttpServletBean implements Applic
HttpServletRequest request, HttpServletResponse response, RequestAttributes previousAttributes) {
if (previousAttributes == null || previousAttributes instanceof ServletRequestAttributes) {
return new ServletRequestAttributes(request);
return new ServletRequestAttributes(request, response);
}
else {
return null; // preserve the pre-bound RequestAttributes instance