Add profiles to /env

This commit is contained in:
Dave Syer
2013-10-16 13:42:13 -04:00
parent 47cd5dd679
commit fede0d1c98
5 changed files with 32 additions and 31 deletions

View File

@@ -49,6 +49,7 @@ public class EnvironmentEndpoint extends AbstractEndpoint<Map<String, Object>> i
@Override
public Map<String, Object> invoke() {
Map<String, Object> result = new LinkedHashMap<String, Object>();
result.put("profiles", this.environment.getActiveProfiles());
for (PropertySource<?> source : getPropertySources()) {
if (source instanceof EnumerablePropertySource) {
EnumerablePropertySource<?> enumerable = (EnumerablePropertySource<?>) source;