@@ -101,7 +101,8 @@ private EnvironmentDescriptor getEnvironmentDescriptor(Predicate<String> propert
101101 propertyNamePredicate , showUnsanitized ));
102102 }
103103 });
104- return new EnvironmentDescriptor (Arrays .asList (this .environment .getActiveProfiles ()), propertySources );
104+ return new EnvironmentDescriptor (Arrays .asList (this .environment .getActiveProfiles ()),
105+ Arrays .asList (this .environment .getDefaultProfiles ()), propertySources );
105106 }
106107
107108 @ ReadOperation
@@ -114,7 +115,7 @@ EnvironmentEntryDescriptor getEnvironmentEntryDescriptor(String propertyName, bo
114115 Map <String , PropertyValueDescriptor > descriptors = getPropertySourceDescriptors (propertyName , showUnsanitized );
115116 PropertySummaryDescriptor summary = getPropertySummaryDescriptor (descriptors );
116117 return new EnvironmentEntryDescriptor (summary , Arrays .asList (this .environment .getActiveProfiles ()),
117- toPropertySourceDescriptors (descriptors ));
118+ Arrays . asList ( this . environment . getDefaultProfiles ()), toPropertySourceDescriptors (descriptors ));
118119 }
119120
120121 private List <PropertySourceEntryDescriptor > toPropertySourceDescriptors (
@@ -209,17 +210,25 @@ public static final class EnvironmentDescriptor implements OperationResponseBody
209210
210211 private final List <String > activeProfiles ;
211212
213+ private final List <String > defaultProfiles ;
214+
212215 private final List <PropertySourceDescriptor > propertySources ;
213216
214- private EnvironmentDescriptor (List <String > activeProfiles , List <PropertySourceDescriptor > propertySources ) {
217+ private EnvironmentDescriptor (List <String > activeProfiles , List <String > defaultProfiles ,
218+ List <PropertySourceDescriptor > propertySources ) {
215219 this .activeProfiles = activeProfiles ;
220+ this .defaultProfiles = defaultProfiles ;
216221 this .propertySources = propertySources ;
217222 }
218223
219224 public List <String > getActiveProfiles () {
220225 return this .activeProfiles ;
221226 }
222227
228+ public List <String > getDefaultProfiles () {
229+ return this .defaultProfiles ;
230+ }
231+
223232 public List <PropertySourceDescriptor > getPropertySources () {
224233 return this .propertySources ;
225234 }
@@ -236,12 +245,15 @@ public static final class EnvironmentEntryDescriptor {
236245
237246 private final List <String > activeProfiles ;
238247
248+ private final List <String > defaultProfiles ;
249+
239250 private final List <PropertySourceEntryDescriptor > propertySources ;
240251
241252 EnvironmentEntryDescriptor (PropertySummaryDescriptor property , List <String > activeProfiles ,
242- List <PropertySourceEntryDescriptor > propertySources ) {
253+ List <String > defaultProfiles , List < PropertySourceEntryDescriptor > propertySources ) {
243254 this .property = property ;
244255 this .activeProfiles = activeProfiles ;
256+ this .defaultProfiles = defaultProfiles ;
245257 this .propertySources = propertySources ;
246258 }
247259
@@ -253,6 +265,10 @@ public List<String> getActiveProfiles() {
253265 return this .activeProfiles ;
254266 }
255267
268+ public List <String > getDefaultProfiles () {
269+ return this .defaultProfiles ;
270+ }
271+
256272 public List <PropertySourceEntryDescriptor > getPropertySources () {
257273 return this .propertySources ;
258274 }
0 commit comments