Skip to content

Commit e551777

Browse files
committed
Use PropertySourcesPropertyResolver provided by Spring Framework
Don't use ConfigurationPropertySources provided by Spring Boot, because some tags do not depend on Spring Boot Closes gh-1273
1 parent a41b294 commit e551777

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

grace-bootstrap/src/main/groovy/grails/util/Metadata.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ import java.lang.ref.Reference
1919
import java.lang.ref.SoftReference
2020

2121
import groovy.transform.CompileStatic
22-
import org.springframework.boot.context.properties.source.ConfigurationPropertySources
2322
import org.springframework.boot.env.PropertiesPropertySourceLoader
2423
import org.springframework.boot.env.YamlPropertySourceLoader
2524
import org.springframework.core.env.ConfigurablePropertyResolver
2625
import org.springframework.core.env.MapPropertySource
2726
import org.springframework.core.env.MutablePropertySources
27+
import org.springframework.core.env.PropertySourcesPropertyResolver
2828
import org.springframework.core.env.StandardEnvironment
2929
import org.springframework.core.env.SystemEnvironmentPropertySource
3030
import org.springframework.core.io.InputStreamResource
@@ -59,17 +59,17 @@ class Metadata {
5959

6060
private Metadata() {
6161
loadFromDefault()
62-
this.propertyResolver = ConfigurationPropertySources.createPropertyResolver(propertySources)
62+
this.propertyResolver = new PropertySourcesPropertyResolver(propertySources)
6363
}
6464

6565
private Metadata(Map<String, Object> properties) {
6666
this.propertySources.addFirst(new MapPropertySource("default", properties))
67-
this.propertyResolver = ConfigurationPropertySources.createPropertyResolver(propertySources)
67+
this.propertyResolver = new PropertySourcesPropertyResolver(propertySources)
6868
}
6969

7070
private Metadata(InputStream inputStream) {
7171
loadFromInputStream(inputStream)
72-
this.propertyResolver = ConfigurationPropertySources.createPropertyResolver(propertySources)
72+
this.propertyResolver = new PropertySourcesPropertyResolver(propertySources)
7373
}
7474

7575
/**

0 commit comments

Comments
 (0)