WebRequest is a resolvable dependency in Servlet/Portlet web application contexts (SPR-6727)

This commit is contained in:
Juergen Hoeller
2010-01-20 22:09:13 +00:00
parent 1b6f3f1f22
commit 0a6f2348b8
4 changed files with 87 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 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.
@@ -902,9 +902,12 @@ public class Portlet20AnnotationControllerTests {
@Autowired
private PortletRequest request;
@Autowired
private WebRequest webRequest;
@RenderMapping
public void myHandle(RenderResponse response) throws IOException {
if (this.portletContext == null || this.session == null || this.request == null) {
if (this.portletContext == null || this.session == null || this.request == null || this.webRequest == null) {
throw new IllegalStateException();
}
response.getWriter().write("myView");