Skip to content

Commit

Permalink
use customize method instead for environment sources
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed May 28, 2014
1 parent f0a483e commit 698fcf3
Showing 1 changed file with 7 additions and 4 deletions.
Expand Up @@ -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;
Expand All @@ -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<String> doGetActiveProfiles() {
Expand Down

0 comments on commit 698fcf3

Please sign in to comment.