From a002d5346c4a1403e609ad5e892e0f12c861bd92 Mon Sep 17 00:00:00 2001
From: Paul-Christian Volkmer <paul-christian.volkmer@mni.thm.de>
Date: Tue, 12 Feb 2013 12:01:00 +0100
Subject: [PATCH] Updated Spring dependencies to 3.2.x release

---
 pom.xml                                       |  2 +-
 src/main/webapp/WEB-INF/arsnova-servlet.xml   | 26 +++++++++++--------
 .../webapp/WEB-INF/spring/spring-main.xml     | 12 ++++-----
 .../webapp/WEB-INF/spring/spring-security.xml |  6 ++---
 .../controller/WelcomeControllerTest.java     |  1 -
 5 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/pom.xml b/pom.xml
index e97a671a7..8effd6591 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
 	<packaging>war</packaging>
 
 	<properties>
-		<org.springframework-version>3.1.3.RELEASE</org.springframework-version>
+		<org.springframework-version>3.2.0.RELEASE</org.springframework-version>
 		<org.springframework.security-version>3.1.3.RELEASE</org.springframework.security-version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<project.url>https://scm.thm.de/arsnova</project.url>
diff --git a/src/main/webapp/WEB-INF/arsnova-servlet.xml b/src/main/webapp/WEB-INF/arsnova-servlet.xml
index 7bc0504de..e255a8190 100644
--- a/src/main/webapp/WEB-INF/arsnova-servlet.xml
+++ b/src/main/webapp/WEB-INF/arsnova-servlet.xml
@@ -4,15 +4,25 @@
 	xmlns:aop="http://www.springframework.org/schema/aop"
 	xmlns:mvc="http://www.springframework.org/schema/mvc"
 	xmlns:context="http://www.springframework.org/schema/context"
-	xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
-		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
-		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
-		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+	xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
+		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">
 
 	<!-- ARSnova Servlet Context -->
 	
 	<context:component-scan base-package="de.thm.arsnova.controller" />
-	<context:annotation-config />
+	<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager" />
+	
+	<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
+	    <property name="favorPathExtension" value="false" />
+	    <property name="favorParameter" value="true" />
+	    <property name="mediaTypes" >
+	        <value>
+	          	json=application/json
+	        </value>
+	    </property>
+	</bean>
 	
 	<aop:aspectj-autoproxy>
 		<aop:include name="authorizationAdviser" />
@@ -34,12 +44,6 @@
 	</bean>
 
 	<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
-		<property name="mediaTypes">
-			<map>
-			 	<entry key="html" value="text/html"/>  
-				<entry key="json" value="application/json" />
-			</map>
-		</property>
 		<property name="viewResolvers">  
 			<list>  
 				<bean class="org.springframework.web.servlet.view.UrlBasedViewResolver">  
diff --git a/src/main/webapp/WEB-INF/spring/spring-main.xml b/src/main/webapp/WEB-INF/spring/spring-main.xml
index c4c06e25c..aeab85f1b 100644
--- a/src/main/webapp/WEB-INF/spring/spring-main.xml
+++ b/src/main/webapp/WEB-INF/spring/spring-main.xml
@@ -7,12 +7,12 @@
 	xmlns:mvc="http://www.springframework.org/schema/mvc"
 	xmlns:task="http://www.springframework.org/schema/task"
 	xmlns:aop="http://www.springframework.org/schema/aop"
-	xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
-		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
-		http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd
-		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
-		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
-		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+	xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
+		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
+		http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.2.xsd
+		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">
 
 	<bean id="propertyPlaceholderConfigurer"
 		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
diff --git a/src/main/webapp/WEB-INF/spring/spring-security.xml b/src/main/webapp/WEB-INF/spring/spring-security.xml
index bc0a0d1f6..ecd7f7669 100644
--- a/src/main/webapp/WEB-INF/spring/spring-security.xml
+++ b/src/main/webapp/WEB-INF/spring/spring-security.xml
@@ -5,9 +5,9 @@
 	xmlns:context="http://www.springframework.org/schema/context"
 	xmlns:p="http://www.springframework.org/schema/p"
 	xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
-		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
-		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-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.2.xsd
+		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
+		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">
 
     <security:authentication-manager alias="authenticationManager">
         <security:authentication-provider ref="facebookAuthProvider" />
diff --git a/src/test/java/de/thm/arsnova/controller/WelcomeControllerTest.java b/src/test/java/de/thm/arsnova/controller/WelcomeControllerTest.java
index 5647c7271..18717546b 100644
--- a/src/test/java/de/thm/arsnova/controller/WelcomeControllerTest.java
+++ b/src/test/java/de/thm/arsnova/controller/WelcomeControllerTest.java
@@ -46,5 +46,4 @@ public class WelcomeControllerTest extends AbstractSpringContextTestBase {
 		assertNotNull(mav);
 		assertEquals("redirect:/index.html", mav.getViewName());
 	}
-
 }
-- 
GitLab