mirror of
https://github.com/apache/struts.git
synced 2026-08-06 07:06:58 +00:00
Merge pull request #189 from lukaszlenart/upgrade-spring
WW-4899: upgrade Spring
This commit is contained in:
+1
-1
@@ -99,7 +99,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>${struts2.springPlatformVersion}</version>
|
||||
<version>${spring.platformVersion}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -224,10 +224,8 @@ public class FileUploadInterceptorTest extends StrutsInternalTestCase {
|
||||
public void testInvalidContentTypeMultipartRequest() throws Exception {
|
||||
MockHttpServletRequest req = new MockHttpServletRequest();
|
||||
|
||||
req.setCharacterEncoding("text/html");
|
||||
req.setContentType("text/xml"); // not a multipart contentype
|
||||
req.setContentType("multipart/form-data"); // not a multipart contentype
|
||||
req.setMethod("post");
|
||||
req.addHeader("Content-type", "multipart/form-data");
|
||||
|
||||
MyFileupAction action = container.inject(MyFileupAction.class);
|
||||
MockActionInvocation mai = new MockActionInvocation();
|
||||
|
||||
@@ -46,6 +46,11 @@
|
||||
<artifactId>spring-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
|
||||
@@ -89,6 +89,12 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.easytesting</groupId>
|
||||
<artifactId>fest-assert</artifactId>
|
||||
|
||||
@@ -68,6 +68,12 @@
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
|
||||
@@ -30,19 +30,28 @@ import java.util.TimeZone;
|
||||
import static javax.servlet.http.HttpServletResponse.*;
|
||||
|
||||
public class DefaultHttpHeadersTest extends TestCase {
|
||||
|
||||
private static final String DATE_FORMAT = "EEE, dd MMM yyyy HH:mm:ss zzz";
|
||||
private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
|
||||
|
||||
private MockHttpServletResponse mockResponse;
|
||||
private MockHttpServletRequest mockRequest;
|
||||
private SimpleDateFormat dateFormat;
|
||||
|
||||
@Override
|
||||
public void setUp() {
|
||||
mockResponse = new MockHttpServletResponse();
|
||||
mockRequest = new MockHttpServletRequest();
|
||||
|
||||
dateFormat = new SimpleDateFormat(DATE_FORMAT, Locale.US);
|
||||
dateFormat.setTimeZone(GMT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tearDown() {
|
||||
mockRequest = null;
|
||||
mockRequest = null;
|
||||
dateFormat = null;
|
||||
}
|
||||
|
||||
public void testApply() {
|
||||
@@ -59,7 +68,7 @@ public class DefaultHttpHeadersTest extends TestCase {
|
||||
assertEquals(SC_CREATED, mockResponse.getStatus());
|
||||
assertEquals("http://localhost/foo/bar/44.xhtml", mockResponse.getHeader("Location"));
|
||||
assertEquals("asdf", mockResponse.getHeader("ETag"));
|
||||
assertEquals(String.valueOf(now.getTime()), mockResponse.getHeader("Last-Modified"));
|
||||
assertEquals(dateFormat.format(now), mockResponse.getHeader("Last-Modified"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<struts2.springPlatformVersion>4.1.9.RELEASE</struts2.springPlatformVersion>
|
||||
<spring.platformVersion>4.3.13.RELEASE</spring.platformVersion>
|
||||
<ognl.version>3.1.15</ognl.version>
|
||||
<asm.version>5.2</asm.version>
|
||||
<tiles.version>3.0.7</tiles.version>
|
||||
@@ -878,47 +878,47 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>${struts2.springPlatformVersion}</version>
|
||||
<version>${spring.platformVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc-portlet</artifactId>
|
||||
<version>${struts2.springPlatformVersion}</version>
|
||||
<version>${spring.platformVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${struts2.springPlatformVersion}</version>
|
||||
<version>${spring.platformVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
<version>${struts2.springPlatformVersion}</version>
|
||||
<version>${spring.platformVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aspects</artifactId>
|
||||
<version>${struts2.springPlatformVersion}</version>
|
||||
<version>${spring.platformVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>${struts2.springPlatformVersion}</version>
|
||||
<version>${spring.platformVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>${struts2.springPlatformVersion}</version>
|
||||
<version>${spring.platformVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
<version>${struts2.springPlatformVersion}</version>
|
||||
<version>${spring.platformVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${struts2.springPlatformVersion}</version>
|
||||
<version>${spring.platformVersion}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
Reference in New Issue
Block a user