From ef1d91b61c76b34b66d7522bf2420e25dbf62abf Mon Sep 17 00:00:00 2001
From: Daniel Gerhardt <daniel.gerhardt@mni.thm.de>
Date: Fri, 8 Aug 2014 16:13:30 +0200
Subject: [PATCH] Fix property file loading order, move property file to
 classpath

---
 src/main/{webapp => resources}/arsnova.properties.example | 0
 src/main/webapp/WEB-INF/spring/arsnova-servlet.xml        | 3 ++-
 src/main/webapp/WEB-INF/spring/spring-main.xml            | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
 rename src/main/{webapp => resources}/arsnova.properties.example (100%)

diff --git a/src/main/webapp/arsnova.properties.example b/src/main/resources/arsnova.properties.example
similarity index 100%
rename from src/main/webapp/arsnova.properties.example
rename to src/main/resources/arsnova.properties.example
diff --git a/src/main/webapp/WEB-INF/spring/arsnova-servlet.xml b/src/main/webapp/WEB-INF/spring/arsnova-servlet.xml
index 00855bf45..1cbf88607 100644
--- a/src/main/webapp/WEB-INF/spring/arsnova-servlet.xml
+++ b/src/main/webapp/WEB-INF/spring/arsnova-servlet.xml
@@ -13,7 +13,8 @@
 	<!-- ARSnova Servlet Context -->
 
 	<context:component-scan base-package="de.thm.arsnova.controller,de.thm.arsnova.web" />
-	<context:property-placeholder location="file:///etc/arsnova/arsnova.properties" file-encoding="UTF-8" />
+	<context:property-placeholder location="classpath:arsnova.properties.example" file-encoding="UTF-8" order="2" ignore-resource-not-found="true" />
+	<context:property-placeholder location="file:///etc/arsnova/arsnova.properties" file-encoding="UTF-8" order="1" ignore-resource-not-found="true" />
 	<mvc:annotation-driven
 		content-negotiation-manager="mvcContentNegotiationManager" />
 
diff --git a/src/main/webapp/WEB-INF/spring/spring-main.xml b/src/main/webapp/WEB-INF/spring/spring-main.xml
index c94ed0de3..d37792995 100644
--- a/src/main/webapp/WEB-INF/spring/spring-main.xml
+++ b/src/main/webapp/WEB-INF/spring/spring-main.xml
@@ -16,7 +16,7 @@
 		p:ignoreUnresolvablePlaceholders="false" p:ignoreResourceNotFound="true">
 		<property name="locations">
 			<list>
-				<value>arsnova.properties.example</value>
+				<value>classpath:arsnova.properties.example</value>
 				<value>file:///etc/arsnova/arsnova.properties</value>
 			</list>
 		</property>
-- 
GitLab