From 698fcf3ec2cb117499a47f764aa360d502fee395 Mon Sep 17 00:00:00 2001 From: Graeme Rocher Date: Wed, 28 May 2014 11:18:44 +0200 Subject: [PATCH] use customize method instead for environment sources --- .../groovy/grails/commons/env/GrailsEnvironment.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/grails-web/src/main/groovy/org/codehaus/groovy/grails/commons/env/GrailsEnvironment.java b/grails-web/src/main/groovy/org/codehaus/groovy/grails/commons/env/GrailsEnvironment.java index d3d1990eba7..ae564b79573 100644 --- a/grails-web/src/main/groovy/org/codehaus/groovy/grails/commons/env/GrailsEnvironment.java +++ b/grails-web/src/main/groovy/org/codehaus/groovy/grails/commons/env/GrailsEnvironment.java @@ -20,6 +20,7 @@ import java.util.Set; import org.codehaus.groovy.grails.commons.GrailsApplication; +import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertiesPropertySource; import org.springframework.core.env.PropertySource; import org.springframework.util.StringUtils; @@ -37,12 +38,14 @@ public class GrailsEnvironment extends StandardServletEnvironment { public GrailsEnvironment(GrailsApplication grailsApplication) { this.grailsApplication = grailsApplication; - getPropertySources().addFirst(new GrailsConfigPropertySource()); - getPropertySources().addFirst(new PropertiesPropertySource("systemProperties", System.getProperties())); - - } + @Override + protected void customizePropertySources(MutablePropertySources propertySources) { + super.customizePropertySources(propertySources); + propertySources.addFirst(new GrailsConfigPropertySource()); + propertySources.addFirst(new PropertiesPropertySource("systemProperties", System.getProperties())); + } @Override protected Set doGetActiveProfiles() {