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

Commit 038e44c

Browse files
committed
Add repro project for SPR-12712
1 parent fc6ded7 commit 038e44c

File tree

10 files changed

+576
-0
lines changed

10 files changed

+576
-0
lines changed

SPR-12712/pom.xml

Lines changed: 324 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,324 @@
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-12712</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.4.RELEASE</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.57/bin/apache-tomcat-7.0.57.zip
21+
</cargo.container.url>
22+
<cargo.container.jvmargs>-Xms96m -Xmx512m -Djava.awt.headless=true</cargo.container.jvmargs>
23+
<cargo.jvm.debug.port>8000</cargo.jvm.debug.port>
24+
</properties>
25+
26+
<dependencies>
27+
<!-- Spring Framework -->
28+
<dependency>
29+
<groupId>org.springframework</groupId>
30+
<artifactId>spring-context</artifactId>
31+
<version>${spring.version}</version>
32+
<exclusions>
33+
<!-- Exclude Commons Logging in favor of SLF4j -->
34+
<exclusion>
35+
<groupId>commons-logging</groupId>
36+
<artifactId>commons-logging</artifactId>
37+
</exclusion>
38+
</exclusions>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.springframework</groupId>
42+
<artifactId>spring-webmvc</artifactId>
43+
<version>${spring.version}</version>
44+
</dependency>
45+
46+
<!-- CGLIB, required for @Configuration usage -->
47+
<dependency>
48+
<groupId>cglib</groupId>
49+
<artifactId>cglib-nodep</artifactId>
50+
<version>2.2</version>
51+
</dependency>
52+
53+
<!-- Logging -->
54+
<dependency>
55+
<groupId>org.slf4j</groupId>
56+
<artifactId>slf4j-api</artifactId>
57+
<version>${slf4j.version}</version>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.slf4j</groupId>
61+
<artifactId>jcl-over-slf4j</artifactId>
62+
<version>${slf4j.version}</version>
63+
<scope>runtime</scope>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.slf4j</groupId>
67+
<artifactId>slf4j-log4j12</artifactId>
68+
<version>${slf4j.version}</version>
69+
<scope>runtime</scope>
70+
</dependency>
71+
<dependency>
72+
<groupId>log4j</groupId>
73+
<artifactId>log4j</artifactId>
74+
<version>1.2.17</version>
75+
<scope>runtime</scope>
76+
</dependency>
77+
78+
<!-- Servlet API -->
79+
<dependency>
80+
<groupId>javax.servlet</groupId>
81+
<artifactId>servlet-api</artifactId>
82+
<version>2.5</version>
83+
<scope>provided</scope>
84+
</dependency>
85+
86+
<!-- JSP API and JSTL
87+
<dependency>
88+
<groupId>javax.servlet.jsp</groupId>
89+
<artifactId>jsp-api</artifactId>
90+
<version>2.1</version>
91+
<scope>provided</scope>
92+
</dependency>
93+
<dependency>
94+
<groupId>javax.servlet</groupId>
95+
<artifactId>jstl</artifactId>
96+
<version>1.2</version>
97+
</dependency>
98+
-->
99+
100+
<!-- Apache Tiles
101+
<dependency>
102+
<groupId>org.apache.tiles</groupId>
103+
<artifactId>tiles-jsp</artifactId>
104+
<version>2.1.3</version>
105+
<exclusions>
106+
<exclusion>
107+
<groupId>commons-logging</groupId>
108+
<artifactId>commons-logging-api</artifactId>
109+
</exclusion>
110+
</exclusions>
111+
</dependency>
112+
-->
113+
114+
<!-- JSR 303 with Hibernate Validator
115+
<dependency>
116+
<groupId>javax.validation</groupId>
117+
<artifactId>validation-api</artifactId>
118+
<version>1.0.0.GA</version>
119+
</dependency>
120+
<dependency>
121+
<groupId>org.hibernate</groupId>
122+
<artifactId>hibernate-validator</artifactId>
123+
<version>4.1.0.Final</version>
124+
</dependency>
125+
-->
126+
127+
<!-- Joda Time Library
128+
<dependency>
129+
<groupId>joda-time</groupId>
130+
<artifactId>joda-time</artifactId>
131+
<version>1.6.2</version>
132+
</dependency>
133+
<dependency>
134+
<groupId>joda-time</groupId>
135+
<artifactId>joda-time-jsptags</artifactId>
136+
<version>1.0.2</version>
137+
<scope>runtime</scope>
138+
</dependency>
139+
-->
140+
141+
<!-- Apache Commons File Upload
142+
<dependency>
143+
<groupId>commons-fileupload</groupId>
144+
<artifactId>commons-fileupload</artifactId>
145+
<version>1.2.2</version>
146+
</dependency>
147+
<dependency>
148+
<groupId>commons-io</groupId>
149+
<artifactId>commons-io</artifactId>
150+
<version>2.0.1</version>
151+
</dependency>
152+
-->
153+
154+
<!-- Jackson JSON Processor
155+
<dependency>
156+
<groupId>com.fasterxml.jackson.core</groupId>
157+
<artifactId>jackson-databind</artifactId>
158+
<version>2.4.3</version>
159+
</dependency>
160+
-->
161+
162+
<!-- Rome Atom+RSS
163+
<dependency>
164+
<groupId>rome</groupId>
165+
<artifactId>rome</artifactId>
166+
<version>1.0</version>
167+
</dependency>
168+
-->
169+
170+
<dependency>
171+
<groupId>org.apache.httpcomponents</groupId>
172+
<artifactId>httpclient</artifactId>
173+
<version>4.4</version>
174+
</dependency>
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>${cargo.container.jvmargs}</cargo.jvmargs>
251+
</properties>
252+
<files>
253+
<copy>
254+
<file>src/test/resources/server.xml</file>
255+
<tofile>conf/server.xml</tofile>
256+
<configfile>true</configfile>
257+
<overwrite>true</overwrite>
258+
</copy>
259+
</files>
260+
</configuration>
261+
<container>
262+
<containerId>${cargo.container.id}</containerId>
263+
<zipUrlInstaller>
264+
<url>${cargo.container.url}</url>
265+
</zipUrlInstaller>
266+
</container>
267+
</configuration>
268+
</plugin>
269+
</plugins>
270+
</build>
271+
272+
<profiles>
273+
<profile>
274+
<id>tomcat8</id>
275+
<properties>
276+
<cargo.container.id>tomcat8x</cargo.container.id>
277+
<cargo.container.url>
278+
http://www.eu.apache.org/dist/tomcat/tomcat-8/v8.0.18/bin/apache-tomcat-8.0.18.zip
279+
</cargo.container.url>
280+
</properties>
281+
</profile>
282+
<profile>
283+
<id>jetty8</id>
284+
<build>
285+
<plugins>
286+
<plugin>
287+
<groupId>org.codehaus.cargo</groupId>
288+
<artifactId>cargo-maven2-plugin</artifactId>
289+
<configuration>
290+
<container>
291+
<containerId>jetty8x</containerId>
292+
<type>embedded</type>
293+
</container>
294+
</configuration>
295+
</plugin>
296+
</plugins>
297+
</build>
298+
</profile>
299+
<profile>
300+
<id>debug</id>
301+
<properties>
302+
<cargo.container.jvmargs>
303+
-Xdebug
304+
-Xrunjdwp:transport=dt_socket,address=${cargo.jvm.debug.port},suspend=n,server=y
305+
-Xnoagent
306+
-Djava.compiler=NONE
307+
</cargo.container.jvmargs>
308+
</properties>
309+
</profile>
310+
</profiles>
311+
312+
<repositories>
313+
<repository>
314+
<id>spring-maven-snapshot</id>
315+
<name>Springframework Maven Snapshot Repository</name>
316+
<url>http://repo.spring.io/snapshot</url>
317+
<snapshots>
318+
<enabled>true</enabled>
319+
</snapshots>
320+
</repository>
321+
</repositories>
322+
323+
</project>
324+

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

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.springframework.issues.config;
2+
3+
import org.springframework.http.ResponseEntity;
4+
import org.springframework.web.bind.annotation.RequestMapping;
5+
import org.springframework.web.bind.annotation.RestController;
6+
7+
@RestController
8+
public class GzipController {
9+
10+
@RequestMapping("/")
11+
public ResponseEntity<String> helloGzip() {
12+
return ResponseEntity.ok()
13+
.header("Connection", "close")
14+
.body("Hello World!");
15+
}
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.springframework.issues.config;
2+
3+
import org.springframework.context.annotation.Bean;
4+
import org.springframework.context.annotation.ComponentScan;
5+
import org.springframework.context.annotation.Configuration;
6+
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
7+
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
8+
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
9+
import org.springframework.web.servlet.view.InternalResourceViewResolver;
10+
11+
@EnableWebMvc
12+
@ComponentScan(basePackages="org.springframework.issues")
13+
@Configuration
14+
public class WebConfig extends WebMvcConfigurerAdapter {
15+
16+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
log4j.rootCategory=INFO, 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

0 commit comments

Comments
 (0)