Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: adrianrm/spring-framework-issues
base: d9c0c30050
...
head fork: adrianrm/spring-framework-issues
compare: 1a8c442b23
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 17 files changed
  • 0 commit comments
  • 1 contributor
View
17 SPR-8551-war-xml/README.txt
@@ -0,0 +1,17 @@
+This is a simple template for creating issue reproduction projects per
+the README.markdown file in the root of this repository (and at
+https://github.com/cbeams/spring-framework-issues#readme). Please read
+that document completely before starting.
+
+As described at the link above, copy this project to a new directory
+having the same name as the JIRA issue you're trying to reproduce and
+edit from there.
+
+Both Gradle (build.gradle) and Maven (pom.xml) build scripts are
+included for your convenience and choice. Once you've created your
+copy of this directory, delete whichever build script you don't wish
+to use, and then edit the remaining one to suit your needs.
+
+Note that this project contains a log4j.properties file in
+src/test/resources that you may wish to configure to emit more detailed
+logging. The log level for org.springframework is set to WARN by default.
View
24 SPR-8551-war-xml/build.gradle
@@ -0,0 +1,24 @@
+group = 'org.springframework.issues'
+version = '1.0.0.SNAPSHOT'
+
+apply plugin: 'java'
+apply plugin: 'eclipse'
+apply plugin: 'idea'
+
+repositories {
+ mavenLocal()
+ mavenCentral()
+ mavenRepo urls: 'http://maven.springframework.org/snapshot'
+}
+
+dependencies {
+ compile 'org.springframework:spring-context:3.1.0.M1'
+ compile 'commons-logging:commons-logging:1.1.1'
+ compile 'log4j:log4j:1.2.16'
+ testCompile 'junit:junit:4.8'
+}
+
+[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:all']
+
+sourceCompatibility = 1.6
+targetCompatibility = 1.6
View
165 SPR-8551-war-xml/pom.xml
@@ -0,0 +1,165 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.springframework.issues</groupId>
+ <artifactId>SPR-8551</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Spring MVC Issue Reproduction Project</name>
+ <packaging>war</packaging>
+
+ <properties>
+ <java-version>1.6</java-version>
+ <org.springframework-version>3.1.0.BUILD-SNAPSHOT</org.springframework-version>
+ <org.slf4j-version>1.6.1</org.slf4j-version>
+ </properties>
+
+ <dependencies>
+ <!-- Spring Framework -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>3.1.0.BUILD-SNAPSHOT</version>
+ <exclusions>
+ <!-- Exclude Commons Logging in favor of SLF4j -->
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>3.1.0.BUILD-SNAPSHOT</version>
+ </dependency>
+
+ <!-- Logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${org.slf4j-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${org.slf4j-version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${org.slf4j-version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- Servlet API -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- JSTL <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId>
+ <version>1.2</version> </dependency> -->
+
+ <!-- JSR 303 with Hibernate Validator <dependency> <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId> <version>1.0.0.GA</version> </dependency>
+ <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId>
+ <version>4.1.0.Final</version> </dependency> -->
+
+ <!-- Joda Time Library <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId>
+ <version>1.6.2</version> </dependency> -->
+
+ <!-- File Upload <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId>
+ <version>1.2.2</version> </dependency> <dependency> <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId> <version>2.0.1</version> </dependency> -->
+
+ <!-- Jackson JSON Processor <dependency> <groupId>org.codehaus.jackson</groupId>
+ <artifactId>jackson-mapper-asl</artifactId> <version>1.8.1</version> </dependency> -->
+
+ <!-- Rome Atom+RSS <dependency> <groupId>rome</groupId> <artifactId>rome</artifactId>
+ <version>1.0</version> </dependency> -->
+
+ <!-- Test -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <repositories>
+ <repository>
+ <id>spring-maven-snapshot</id>
+ <name>Springframework Maven Snapshot Repository</name>
+ <url>http://maven.springframework.org/snapshot</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <!-- For Hibernate Validator -->
+ <repository>
+ <id>org.jboss.repository.releases</id>
+ <name>JBoss Maven Release Repository</name>
+ <url>https://repository.jboss.org/nexus/content/repositories/releases</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <!-- For Rome -->
+ <repository>
+ <id>maven2-repository.dev.java.net</id>
+ <name>Java.net Repository for Maven</name>
+ <url>http://download.java.net/maven/2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${java-version}</source>
+ <target>${java-version}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install</id>
+ <phase>install</phase>
+ <goals>
+ <goal>sources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*Tests.java</include>
+ </includes>
+ <excludes>
+ <exclude>**/*Abstract*.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+
View
7 SPR-8551-war-xml/src/main/resources/log4j.properties
@@ -0,0 +1,7 @@
+log4j.rootCategory=INFO, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
+
+log4j.category.org.springframework.web=DEBUG
View
9 SPR-8551-war-xml/src/main/webapp/WEB-INF/spring/root-context.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
+
+ <!-- Root Context: defines shared resources visible to all other web components -->
+
+</beans>
View
22 SPR-8551-war-xml/src/main/webapp/WEB-INF/spring/servlet-context.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:mvc="http://www.springframework.org/schema/mvc"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
+
+ <mvc:annotation-driven />
+
+ <mvc:view-controller path="/" view-name="home" />
+
+ <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+ <property name="prefix" value="/WEB-INF/views/" />
+ <property name="suffix" value=".jsp" />
+ </bean>
+
+ <context:component-scan base-package="org.springframework.web.issues" />
+
+</beans>
View
11 SPR-8551-war-xml/src/main/webapp/WEB-INF/views/home.jsp
@@ -0,0 +1,11 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Home</title>
+</head>
+<body>
+ <h1>Home</h1>
+</body>
+</html>
View
36 SPR-8551-war-xml/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>/WEB-INF/spring/root-context.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>appServlet</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <init-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>/WEB-INF/spring/servlet-context.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>appServlet</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+ <!-- Disables Servlet Container welcome file handling. Needed for compatibility
+ with Servlet 3.0 and Tomcat 7.0 -->
+ <welcome-file-list>
+ <welcome-file></welcome-file>
+ </welcome-file-list>
+
+</web-app>
View
7 SPR-8551-war-xml/src/test/resources/log4j.properties
@@ -0,0 +1,7 @@
+log4j.rootCategory=INFO, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
+
+log4j.category.org.springframework.web=DEBUG
View
17 SPR-8551/README.txt
@@ -0,0 +1,17 @@
+This is a simple template for creating issue reproduction projects per
+the README.markdown file in the root of this repository (and at
+https://github.com/cbeams/spring-framework-issues#readme). Please read
+that document completely before starting.
+
+As described at the link above, copy this project to a new directory
+having the same name as the JIRA issue you're trying to reproduce and
+edit from there.
+
+Both Gradle (build.gradle) and Maven (pom.xml) build scripts are
+included for your convenience and choice. Once you've created your
+copy of this directory, delete whichever build script you don't wish
+to use, and then edit the remaining one to suit your needs.
+
+Note that this project contains a log4j.properties file in
+src/test/resources that you may wish to configure to emit more detailed
+logging. The log level for org.springframework is set to WARN by default.
View
24 SPR-8551/build.gradle
@@ -0,0 +1,24 @@
+group = 'org.springframework.issues'
+version = '1.0.0.SNAPSHOT'
+
+apply plugin: 'java'
+apply plugin: 'eclipse'
+apply plugin: 'idea'
+
+repositories {
+ mavenLocal()
+ mavenCentral()
+ mavenRepo urls: 'http://maven.springframework.org/snapshot'
+}
+
+dependencies {
+ compile 'org.springframework:spring-context:3.1.0.M1'
+ compile 'commons-logging:commons-logging:1.1.1'
+ compile 'log4j:log4j:1.2.16'
+ testCompile 'junit:junit:4.8'
+}
+
+[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:all']
+
+sourceCompatibility = 1.6
+targetCompatibility = 1.6
View
61 SPR-8551/pom.xml
@@ -0,0 +1,61 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.springframework.issues</groupId>
+ <artifactId>SPR-8551</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Spring Issue Reproduction Project</name>
+ <packaging>jar</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>3.1.0.BUILD-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>spring-maven-snapshot</id>
+ <name>Springframework Maven Snapshot Repository</name>
+ <url>http://maven.springframework.org/snapshot</url>
+ <snapshots><enabled>true</enabled></snapshots>
+ </repository>
+ </repositories>
+ <properties>
+ <project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*Tests.java</include>
+ </includes>
+ <excludes>
+ <exclude>**/*Abstract*.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
+
View
5 SPR-8551/src/main/java/org/springframework/issues/Bar.java
@@ -0,0 +1,5 @@
+package org.springframework.issues;
+
+public class Bar {
+
+}
View
14 SPR-8551/src/main/java/org/springframework/issues/Foo.java
@@ -0,0 +1,14 @@
+package org.springframework.issues;
+
+public class Foo {
+
+ private final Bar bar;
+
+ public Foo(Bar bar) {
+ this.bar = bar;
+ }
+
+ public Bar getBar() {
+ return this.bar;
+ }
+}
View
7 SPR-8551/src/test/java/log4j.properties
@@ -0,0 +1,7 @@
+log4j.rootCategory=ERROR, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
+
+log4j.category.org.springframework=WARN
View
28 SPR-8551/src/test/java/org/springframework/issues/ReproTests.java
@@ -0,0 +1,28 @@
+package org.springframework.issues;
+
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+import org.springframework.context.support.GenericXmlApplicationContext;
+
+/**
+ * Unit test that reproduces an issue reported against SPR JIRA. @Test methods within
+ * need not pass with the green bar! Rather they should fail in such a way that
+ * demonstrates the reported issue.
+ */
+public class ReproTests {
+
+ @Test
+ public void repro() {
+ GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
+ ctx.load("classpath:org/springframework/issues/ReproTests-context.xml");
+ ctx.refresh();
+
+ Foo foo = ctx.getBean(Foo.class);
+ Bar bar = ctx.getBean(Bar.class);
+
+ assertThat(foo.getBar(), sameInstance(bar));
+ }
+
+}
View
14 SPR-8551/src/test/resources/org/springframework/issues/ReproTests-context.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
+
+ <bean id="foo" class="org.springframework.issues.Foo">
+ <constructor-arg ref="bar"/>
+ </bean>
+
+ <bean id="bar" class="org.springframework.issues.Bar"/>
+
+</beans>

No commit comments for this range

Something went wrong with that request. Please try again.