Fix manipulating property sources example in Javadoc for ConfigurableEnvironment
The "manipulating property sources" example in the Javadoc for `ConfigurableEnvironment` states that `MutablePropertySources` expect a `Map<String,String>`; whereas it expects a `Map<String,Object>`. Closes gh-29693
This commit is contained in:
@@ -37,7 +37,7 @@ import java.util.Map;
|
||||
* <pre class="code">
|
||||
* ConfigurableEnvironment environment = new StandardEnvironment();
|
||||
* MutablePropertySources propertySources = environment.getPropertySources();
|
||||
* Map<String, String> myMap = new HashMap<>();
|
||||
* Map<String, Object> myMap = new HashMap<>();
|
||||
* myMap.put("xyz", "myValue");
|
||||
* propertySources.addFirst(new MapPropertySource("MY_MAP", myMap));
|
||||
* </pre>
|
||||
|
||||
Reference in New Issue
Block a user