Permalink
Browse files

GRAILS-9332 "Upgrade Spring to 3.1.2.RELEASE version"

  • Loading branch information...
1 parent 3f079c1 commit a41b4d4088aa876cacacc21124a4978ff844b96c @lhotari lhotari committed Sep 1, 2012
View
@@ -36,7 +36,7 @@ ext {
jnaVersion = "3.2.3"
slf4jVersion = "1.6.2"
springLoadedVersion = "1.0.6"
- springVersion = "3.1.0.RELEASE"
+ springVersion = "3.1.2.RELEASE"
springWebflowVersion= "2.0.8.RELEASE"
hibernateVersion = "3.6.10.Final"
ehcacheVersion = "2.4.6"
View
@@ -161,7 +161,7 @@ The following libraries are included in Grails because they are required either
- required for running Grails applications
* org.springframework.*.jar
-- Spring Framework 3.1.0.RELEASE (http://www.springframework.org) Apache 2.0 License
+- Spring Framework 3.1.2.RELEASE (http://www.springframework.org) Apache 2.0 License
- required for building Grails core
- required for the command line tools (Gant)
- required for running Grails applications
@@ -32,7 +32,7 @@
public final String servletVersion;
public boolean java5compatible;
- private final String springVersion = "3.1.0.RELEASE";
+ private final String springVersion = "3.1.2.RELEASE";
public GrailsCoreDependencies(String grailsVersion) {
this.grailsVersion = grailsVersion;
@@ -32,10 +32,12 @@
import org.springframework.ui.context.ThemeSource;
import org.springframework.util.Assert;
import org.springframework.web.context.ConfigurableWebApplicationContext;
+import org.springframework.web.context.ConfigurableWebEnvironment;
import org.springframework.web.context.ServletContextAware;
import org.springframework.web.context.support.ServletContextAwareProcessor;
import org.springframework.web.context.support.ServletContextResource;
import org.springframework.web.context.support.ServletContextResourcePatternResolver;
+import org.springframework.web.context.support.StandardServletEnvironment;
import org.springframework.web.context.support.WebApplicationContextUtils;
/**
@@ -79,7 +81,7 @@ public ClassLoader getClassLoader() {
return super.getClassLoader();
}
-
+
private GrailsApplication getGrailsApplication() {
ApplicationContext parent = getParent();
GrailsApplication application = null;
@@ -184,6 +186,15 @@ protected ConfigurableEnvironment createEnvironment() {
if (grailsApplication != null) {
return new GrailsEnvironment(grailsApplication);
}
- return super.createEnvironment();
+ return new StandardServletEnvironment();
+ }
+
+ @Override
+ public ConfigurableWebEnvironment getEnvironment() {
+ ConfigurableEnvironment env = super.getEnvironment();
+ Assert.isInstanceOf(ConfigurableWebEnvironment.class, env,
+ "ConfigurableWebApplication environment must be of type " +
+ "ConfigurableWebEnvironment");
+ return (ConfigurableWebEnvironment) env;
}
}

0 comments on commit a41b4d4

Please sign in to comment.