Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit 953eb7c

Browse files
committed
Add repro project for SPR-7093
1 parent eeb736b commit 953eb7c

File tree

8 files changed

+395
-0
lines changed

8 files changed

+395
-0
lines changed

SPR-7093/pom.xml

Lines changed: 305 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,305 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.springframework.issues</groupId>
5+
<artifactId>SPR-7093</artifactId>
6+
<version>1.0-SNAPSHOT</version>
7+
<name>Spring MVC Issue Reproduction Project</name>
8+
<packaging>war</packaging>
9+
10+
<properties>
11+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12+
13+
<java.version>1.6</java.version>
14+
<spring.version>4.1.0.BUILD-SNAPSHOT</spring.version>
15+
<slf4j.version>1.7.5</slf4j.version>
16+
17+
<jetty.version>9.1.2.v20140210</jetty.version>
18+
<cargo.container.id>tomcat7x</cargo.container.id>
19+
<cargo.container.url>
20+
http://www.eu.apache.org/dist/tomcat/tomcat-7/v7.0.52/bin/apache-tomcat-7.0.52.zip
21+
</cargo.container.url>
22+
</properties>
23+
24+
<dependencies>
25+
<!-- Spring Framework -->
26+
<dependency>
27+
<groupId>org.springframework</groupId>
28+
<artifactId>spring-context</artifactId>
29+
<version>${spring.version}</version>
30+
<exclusions>
31+
<!-- Exclude Commons Logging in favor of SLF4j -->
32+
<exclusion>
33+
<groupId>commons-logging</groupId>
34+
<artifactId>commons-logging</artifactId>
35+
</exclusion>
36+
</exclusions>
37+
</dependency>
38+
<dependency>
39+
<groupId>org.springframework</groupId>
40+
<artifactId>spring-webmvc</artifactId>
41+
<version>${spring.version}</version>
42+
</dependency>
43+
44+
<!-- CGLIB, required for @Configuration usage -->
45+
<dependency>
46+
<groupId>cglib</groupId>
47+
<artifactId>cglib-nodep</artifactId>
48+
<version>2.2</version>
49+
</dependency>
50+
51+
<!-- Logging -->
52+
<dependency>
53+
<groupId>org.slf4j</groupId>
54+
<artifactId>slf4j-api</artifactId>
55+
<version>${slf4j.version}</version>
56+
</dependency>
57+
<dependency>
58+
<groupId>org.slf4j</groupId>
59+
<artifactId>jcl-over-slf4j</artifactId>
60+
<version>${slf4j.version}</version>
61+
<scope>runtime</scope>
62+
</dependency>
63+
<dependency>
64+
<groupId>org.slf4j</groupId>
65+
<artifactId>slf4j-log4j12</artifactId>
66+
<version>${slf4j.version}</version>
67+
<scope>runtime</scope>
68+
</dependency>
69+
<dependency>
70+
<groupId>log4j</groupId>
71+
<artifactId>log4j</artifactId>
72+
<version>1.2.17</version>
73+
<scope>runtime</scope>
74+
</dependency>
75+
76+
<!-- Servlet API -->
77+
<dependency>
78+
<groupId>javax.servlet</groupId>
79+
<artifactId>servlet-api</artifactId>
80+
<version>2.5</version>
81+
<scope>provided</scope>
82+
</dependency>
83+
84+
<dependency>
85+
<groupId>org.freemarker</groupId>
86+
<artifactId>freemarker</artifactId>
87+
<version>2.3.20</version>
88+
</dependency>
89+
90+
91+
92+
<!-- JSP API and JSTL
93+
<dependency>
94+
<groupId>javax.servlet.jsp</groupId>
95+
<artifactId>jsp-api</artifactId>
96+
<version>2.1</version>
97+
<scope>provided</scope>
98+
</dependency>-->
99+
<dependency>
100+
<groupId>javax.servlet</groupId>
101+
<artifactId>jstl</artifactId>
102+
<version>1.2</version>
103+
</dependency>
104+
105+
106+
<!-- Apache Tiles
107+
<dependency>
108+
<groupId>org.apache.tiles</groupId>
109+
<artifactId>tiles-jsp</artifactId>
110+
<version>2.1.3</version>
111+
<exclusions>
112+
<exclusion>
113+
<groupId>commons-logging</groupId>
114+
<artifactId>commons-logging-api</artifactId>
115+
</exclusion>
116+
</exclusions>
117+
</dependency>
118+
-->
119+
120+
<!-- JSR 303 with Hibernate Validator
121+
<dependency>
122+
<groupId>javax.validation</groupId>
123+
<artifactId>validation-api</artifactId>
124+
<version>1.0.0.GA</version>
125+
</dependency>
126+
<dependency>
127+
<groupId>org.hibernate</groupId>
128+
<artifactId>hibernate-validator</artifactId>
129+
<version>4.1.0.Final</version>
130+
</dependency>
131+
-->
132+
133+
<!-- Joda Time Library
134+
<dependency>
135+
<groupId>joda-time</groupId>
136+
<artifactId>joda-time</artifactId>
137+
<version>1.6.2</version>
138+
</dependency>
139+
<dependency>
140+
<groupId>joda-time</groupId>
141+
<artifactId>joda-time-jsptags</artifactId>
142+
<version>1.0.2</version>
143+
<scope>runtime</scope>
144+
</dependency>
145+
-->
146+
147+
<!-- Apache Commons File Upload
148+
<dependency>
149+
<groupId>commons-fileupload</groupId>
150+
<artifactId>commons-fileupload</artifactId>
151+
<version>1.2.2</version>
152+
</dependency>
153+
<dependency>
154+
<groupId>commons-io</groupId>
155+
<artifactId>commons-io</artifactId>
156+
<version>2.0.1</version>
157+
</dependency>
158+
-->
159+
160+
<!-- Jackson JSON Processor
161+
<dependency>
162+
<groupId>org.codehaus.jackson</groupId>
163+
<artifactId>jackson-mapper-asl</artifactId>
164+
<version>1.8.1</version>
165+
</dependency>
166+
-->
167+
168+
<!-- Rome Atom+RSS
169+
<dependency>
170+
<groupId>rome</groupId>
171+
<artifactId>rome</artifactId>
172+
<version>1.0</version>
173+
</dependency>
174+
-->
175+
176+
<!-- Test -->
177+
<dependency>
178+
<groupId>junit</groupId>
179+
<artifactId>junit</artifactId>
180+
<version>4.11</version>
181+
<scope>test</scope>
182+
</dependency>
183+
</dependencies>
184+
185+
<build>
186+
<plugins>
187+
<plugin>
188+
<groupId>org.apache.maven.plugins</groupId>
189+
<artifactId>maven-compiler-plugin</artifactId>
190+
<version>2.5.1</version>
191+
<configuration>
192+
<source>${java.version}</source>
193+
<target>${java.version}</target>
194+
</configuration>
195+
</plugin>
196+
<plugin>
197+
<groupId>org.apache.maven.plugins</groupId>
198+
<artifactId>maven-dependency-plugin</artifactId>
199+
<version>2.8</version>
200+
<executions>
201+
<execution>
202+
<id>install</id>
203+
<phase>install</phase>
204+
<goals>
205+
<goal>sources</goal>
206+
</goals>
207+
</execution>
208+
</executions>
209+
</plugin>
210+
<plugin>
211+
<groupId>org.apache.maven.plugins</groupId>
212+
<artifactId>maven-eclipse-plugin</artifactId>
213+
<version>2.8</version>
214+
<configuration>
215+
<downloadSources>true</downloadSources>
216+
<downloadJavadocs>false</downloadJavadocs>
217+
<wtpversion>2.0</wtpversion>
218+
</configuration>
219+
</plugin>
220+
<plugin>
221+
<groupId>org.apache.maven.plugins</groupId>
222+
<artifactId>maven-surefire-plugin</artifactId>
223+
<version>2.12.4</version>
224+
<configuration>
225+
<includes>
226+
<include>**/*Tests.java</include>
227+
<include>**/*Test.java</include>
228+
</includes>
229+
<excludes>
230+
<exclude>**/*Abstract*.java</exclude>
231+
</excludes>
232+
</configuration>
233+
</plugin>
234+
<plugin>
235+
<groupId>org.eclipse.jetty</groupId>
236+
<artifactId>jetty-maven-plugin</artifactId>
237+
<version>${jetty.version}</version>
238+
</plugin>
239+
<plugin>
240+
<groupId>org.codehaus.cargo</groupId>
241+
<artifactId>cargo-maven2-plugin</artifactId>
242+
<version>1.4.7</version>
243+
<configuration>
244+
<configuration>
245+
<properties>
246+
<cargo.servlet.port>8080</cargo.servlet.port>
247+
<cargo.tomcat.ajp.port>1099</cargo.tomcat.ajp.port>
248+
<cargo.rmi.port>1099</cargo.rmi.port>
249+
<cargo.logging>medium</cargo.logging>
250+
<cargo.jvmargs>-Xms96m -Xmx512m -Djava.awt.headless=true</cargo.jvmargs>
251+
</properties>
252+
</configuration>
253+
<container>
254+
<containerId>${cargo.container.id}</containerId>
255+
<zipUrlInstaller>
256+
<url>${cargo.container.url}</url>
257+
</zipUrlInstaller>
258+
</container>
259+
</configuration>
260+
</plugin>
261+
</plugins>
262+
</build>
263+
264+
<profiles>
265+
<profile>
266+
<id>tomcat8</id>
267+
<properties>
268+
<cargo.container.id>tomcat8x</cargo.container.id>
269+
<cargo.container.url>
270+
http://www.eu.apache.org/dist/tomcat/tomcat-8/v8.0.3/bin/apache-tomcat-8.0.3.zip
271+
</cargo.container.url>
272+
</properties>
273+
</profile>
274+
<profile>
275+
<id>jetty8</id>
276+
<build>
277+
<plugins>
278+
<plugin>
279+
<groupId>org.codehaus.cargo</groupId>
280+
<artifactId>cargo-maven2-plugin</artifactId>
281+
<configuration>
282+
<container>
283+
<containerId>jetty8x</containerId>
284+
<type>embedded</type>
285+
</container>
286+
</configuration>
287+
</plugin>
288+
</plugins>
289+
</build>
290+
</profile>
291+
</profiles>
292+
293+
<repositories>
294+
<repository>
295+
<id>spring-maven-snapshot</id>
296+
<name>Springframework Maven Snapshot Repository</name>
297+
<url>http://repo.spring.io/snapshot</url>
298+
<snapshots>
299+
<enabled>true</enabled>
300+
</snapshots>
301+
</repository>
302+
</repositories>
303+
304+
</project>
305+

SPR-7093/src/main/java/org/springframework/issues/.gitignore

Whitespace-only changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package org.springframework.issues.config;
2+
3+
import org.springframework.context.annotation.ComponentScan;
4+
import org.springframework.context.annotation.Configuration;
5+
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
6+
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
7+
import org.springframework.web.servlet.config.annotation.ViewResolutionRegistry;
8+
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
9+
10+
@EnableWebMvc
11+
@ComponentScan(basePackages="org.springframework.issues")
12+
@Configuration
13+
public class WebConfig extends WebMvcConfigurerAdapter {
14+
15+
@Override
16+
public void addViewControllers(ViewControllerRegistry registry) {
17+
registry.addViewController("/").setViewName("home");
18+
}
19+
20+
@Override
21+
public void configureViewResolution(ViewResolutionRegistry registry) {
22+
registry.jsp();
23+
}
24+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
log4j.rootCategory=DEBUG, stdout
2+
3+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
4+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5+
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
6+
7+
log4j.category.org.springframework.web=DEBUG
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
2+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3+
<html>
4+
<head>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6+
<title>Site</title>
7+
</head>
8+
<body>
9+
<h1>Home</h1>
10+
</body>
11+
</html>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
5+
6+
<context-param>
7+
<param-name>contextClass</param-name>
8+
<param-value>org.springframework.web.context.support.AnnotationConfigWebApplicationContext</param-value>
9+
</context-param>
10+
11+
<context-param>
12+
<param-name>contextConfigLocation</param-name>
13+
<param-value>org.springframework.issues.config</param-value>
14+
</context-param>
15+
16+
<listener>
17+
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
18+
</listener>
19+
20+
<servlet>
21+
<servlet-name>appServlet</servlet-name>
22+
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
23+
<init-param>
24+
<param-name>contextConfigLocation</param-name>
25+
<param-value></param-value>
26+
</init-param>
27+
<load-on-startup>1</load-on-startup>
28+
</servlet>
29+
30+
<servlet-mapping>
31+
<servlet-name>appServlet</servlet-name>
32+
<url-pattern>/</url-pattern>
33+
</servlet-mapping>
34+
35+
<!-- Disables Servlet Container welcome file handling. Needed for compatibility
36+
with Servlet 3.0 and Tomcat 7.0 -->
37+
<welcome-file-list>
38+
<welcome-file></welcome-file>
39+
</welcome-file-list>
40+
41+
</web-app>

SPR-7093/src/test/java/org/springframework/issues/.gitignore

Whitespace-only changes.

0 commit comments

Comments
 (0)