From fe7a12574bb254c6725f66704aad32ed38f3e5aa Mon Sep 17 00:00:00 2001 From: Musachy Barroso Date: Wed, 15 Jul 2009 21:07:45 +0000 Subject: [PATCH] fix bug that added all the watched dirs as stores to the reloading classloader git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@794418 13f79535-47bb-0310-9956-ffa450edef68 --- .../struts2/spring/ClassReloadingXMLWebApplicationContext.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java b/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java index 58354163c..1601bf7e8 100644 --- a/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java +++ b/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java @@ -110,8 +110,9 @@ public class ClassReloadingXMLWebApplicationContext extends XmlWebApplicationCon List dirs = new ArrayList(); getAllPaths(file, dirs); + classLoader.addResourceStore(new FileResourceStore(file)); + for (File dir : dirs) { - classLoader.addResourceStore(new FileResourceStore(dir)); //register with the fam fam.addListener(dir, this); LOG.debug("Watching [#0] for changes", dir.getAbsolutePath());