Merge branch '1.4.x' into 1.5.x
This commit is contained in:
@@ -138,6 +138,16 @@ public class EnvironmentMvcEndpointTests {
|
||||
.andExpect(content().string(containsString("\"fool\":\"baz\"")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nestedPathWhenPlaceholderCannotBeResolvedShouldReturnUnresolvedProperty() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("my.foo", "${my.bar}");
|
||||
((ConfigurableEnvironment) this.context.getEnvironment()).getPropertySources()
|
||||
.addFirst(new MapPropertySource("unresolved-placeholder", map));
|
||||
this.mvc.perform(get("/env/my.*")).andExpect(status().isOk())
|
||||
.andExpect(content().string(containsString("\"my.foo\":\"${my.bar}\"")));
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@Import({ JacksonAutoConfiguration.class,
|
||||
HttpMessageConvertersAutoConfiguration.class, WebMvcAutoConfiguration.class,
|
||||
|
||||
Reference in New Issue
Block a user