@ -183,7 +183,7 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS
@@ -183,7 +183,7 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS
@ -55,7 +55,7 @@ public class ArgumentPreparedStatementSetter implements PreparedStatementSetter,
@@ -55,7 +55,7 @@ public class ArgumentPreparedStatementSetter implements PreparedStatementSetter,
@ -89,7 +89,7 @@ public class ArgumentTypePreparedStatementSetter implements PreparedStatementSet
@@ -89,7 +89,7 @@ public class ArgumentTypePreparedStatementSetter implements PreparedStatementSet
@ -85,16 +86,13 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
@@ -85,16 +86,13 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
@ -110,10 +108,10 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
@@ -110,10 +108,10 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
@ -152,8 +150,8 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
@@ -152,8 +150,8 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
"Cannot process locations AND classes for context configuration %s: "
+"configure one or the other, but not both.",configAttributes));
"Cannot process locations AND classes for context configuration %s: "+
"configure one or the other, but not both.",configAttributes));
// If the original locations or classes were not empty, there's no
// need to bother with default detection checks; just let the
@ -174,14 +172,14 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
@@ -174,14 +172,14 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
if(xmlLoaderDetectedDefaults){
if(logger.isInfoEnabled()){
logger.info(String.format("%s detected default locations for context configuration %s.",
name(getXmlLoader()),configAttributes));
name(getXmlLoader()),configAttributes));
}
}
if(configAttributes.hasClasses()){
thrownewIllegalStateException(String.format(
"%s should NOT have detected default configuration classes for context configuration %s.",
name(getXmlLoader()),configAttributes));
"%s should NOT have detected default configuration classes for context configuration %s.",
name(getXmlLoader()),configAttributes));
}
// Now let the annotation config loader process the configuration.
@ -190,24 +188,24 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
@@ -190,24 +188,24 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
if(configAttributes.hasClasses()){
if(logger.isInfoEnabled()){
logger.info(String.format(
"%s detected default configuration classes for context configuration %s.",
"Configuration error: both default locations AND default configuration classes "
+"were detected for context configuration %s; configure one or the other, but not both.",
configAttributes);
logger.error(message);
thrownewIllegalStateException(message);
Stringmsg=String.format(
"Configuration error: both default locations AND default configuration classes "+
"were detected for context configuration %s; configure one or the other, but not both.",
configAttributes);
logger.error(msg);
thrownewIllegalStateException(msg);
}
}
}
@ -239,9 +237,9 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
@@ -239,9 +237,9 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
"Neither %s nor %s supports loading an ApplicationContext from %s: "
+"declare either 'locations' or 'classes' but not both.",name(getXmlLoader()),
name(getAnnotationConfigLoader()),mergedConfig));
"Neither %s nor %s supports loading an ApplicationContext from %s: "+
"declare either 'locations' or 'classes' but not both.",name(getXmlLoader()),
name(getAnnotationConfigLoader()),mergedConfig));
}
for(SmartContextLoaderloader:candidates){
@ -261,22 +259,28 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
@@ -261,22 +259,28 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
// else...
thrownewIllegalStateException(String.format(
"Neither %s nor %s was able to load an ApplicationContext from %s.",name(getXmlLoader()),
name(getAnnotationConfigLoader()),mergedConfig));
"Neither %s nor %s was able to load an ApplicationContext from %s.",name(getXmlLoader()),
@ -287,8 +291,9 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
@@ -287,8 +291,9 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
@ -58,11 +58,10 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@@ -58,11 +58,10 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@ -71,7 +70,6 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@@ -71,7 +70,6 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@ -84,14 +82,13 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@@ -84,14 +82,13 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@ -101,21 +98,21 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@@ -101,21 +98,21 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
"AnnotationConfigContextLoader does not support the modifyLocations(Class, String...) method");
"AnnotationConfigContextLoader does not support the modifyLocations(Class, String...) method");
}
/**
@ -123,14 +120,13 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@@ -123,14 +120,13 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
"AnnotationConfigContextLoader does not support the generateDefaultLocations(Class) method");
"AnnotationConfigContextLoader does not support the generateDefaultLocations(Class) method");
}
/**
@ -138,17 +134,17 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@@ -138,17 +134,17 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@ -159,10 +155,10 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@@ -159,10 +155,10 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@ -171,18 +167,14 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@@ -171,18 +167,14 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@ -199,15 +191,14 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@@ -199,15 +191,14 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
@ -39,7 +39,6 @@ public class GenericGroovyXmlContextLoader extends GenericXmlContextLoader {
@@ -39,7 +39,6 @@ public class GenericGroovyXmlContextLoader extends GenericXmlContextLoader {
@ -63,12 +62,12 @@ public class GenericGroovyXmlContextLoader extends GenericXmlContextLoader {
@@ -63,12 +62,12 @@ public class GenericGroovyXmlContextLoader extends GenericXmlContextLoader {
@ -63,14 +63,12 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@@ -63,14 +63,12 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@ -97,18 +95,16 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@@ -97,18 +95,16 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@ -152,20 +148,15 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@@ -152,20 +148,15 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@ -180,32 +171,27 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@@ -180,32 +171,27 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@ -213,7 +199,7 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@@ -213,7 +199,7 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
}
parent=parent.getParent();
}
Assert.state(servletContext!=null,"Failed to find Root WebApplicationContext in the context hierarchy");
Assert.state(servletContext!=null,"Failed to find root WebApplicationContext in the context hierarchy");
context.setServletContext(servletContext);
}
}
@ -221,10 +207,8 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@@ -221,10 +207,8 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@ -234,57 +218,55 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@@ -234,57 +218,55 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
@ -59,11 +59,10 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
@@ -59,11 +59,10 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
@ -72,7 +71,6 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
@@ -72,7 +71,6 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
@ -87,34 +85,31 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
@@ -87,34 +85,31 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
"AnnotationConfigWebContextLoader does not support the modifyLocations(Class, String...) method");
"AnnotationConfigWebContextLoader does not support the modifyLocations(Class, String...) method");
}
/**
@ -122,14 +117,13 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
@@ -122,14 +117,13 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
"AnnotationConfigWebContextLoader does not support the generateDefaultLocations(Class) method");
"AnnotationConfigWebContextLoader does not support the generateDefaultLocations(Class) method");
}
/**
@ -137,34 +131,32 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
@@ -137,34 +131,32 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
@ -181,10 +173,10 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
@@ -181,10 +173,10 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL
@ -38,7 +38,6 @@ public class GenericGroovyXmlWebContextLoader extends GenericXmlWebContextLoader
@@ -38,7 +38,6 @@ public class GenericGroovyXmlWebContextLoader extends GenericXmlWebContextLoader
@ -63,12 +62,12 @@ public class GenericGroovyXmlWebContextLoader extends GenericXmlWebContextLoader
@@ -63,12 +62,12 @@ public class GenericGroovyXmlWebContextLoader extends GenericXmlWebContextLoader