@@ -165,6 +165,9 @@ protected String generateJson(Set<ConfigurableApplicationContext> contexts) {
165
165
result .append (",\n " );
166
166
}
167
167
result .append ("{\n \" bean\" : \" " ).append (beanName ).append ("\" ,\n " );
168
+ result .append ("\" aliases\" : " );
169
+ appendArray (result , bf .getAliases (beanName ));
170
+ result .append (",\n " );
168
171
String scope = bd .getScope ();
169
172
if (!StringUtils .hasText (scope )) {
170
173
scope = BeanDefinition .SCOPE_SINGLETON ;
@@ -178,16 +181,9 @@ protected String generateJson(Set<ConfigurableApplicationContext> contexts) {
178
181
result .append ("\" type\" : null,\n " );
179
182
}
180
183
result .append ("\" resource\" : \" " ).append (getEscapedResourceDescription (bd )).append ("\" ,\n " );
181
- result .append ("\" dependencies\" : [" );
182
- String [] dependencies = bf .getDependenciesForBean (beanName );
183
- if (dependencies .length > 0 ) {
184
- result .append ("\" " );
185
- }
186
- result .append (StringUtils .arrayToDelimitedString (dependencies , "\" , \" " ));
187
- if (dependencies .length > 0 ) {
188
- result .append ("\" " );
189
- }
190
- result .append ("]\n }" );
184
+ result .append ("\" dependencies\" : " );
185
+ appendArray (result , bf .getDependenciesForBean (beanName ));
186
+ result .append ("\n }" );
191
187
elementAppended = true ;
192
188
}
193
189
}
@@ -241,4 +237,16 @@ else if (character == '"') {
241
237
return result .toString ();
242
238
}
243
239
240
+ private void appendArray (StringBuilder result , String [] arr ) {
241
+ result .append ('[' );
242
+ if (arr .length > 0 ) {
243
+ result .append ('\"' );
244
+ }
245
+ result .append (StringUtils .arrayToDelimitedString (arr , "\" , \" " ));
246
+ if (arr .length > 0 ) {
247
+ result .append ('\"' );
248
+ }
249
+ result .append (']' );
250
+ }
251
+
244
252
}
0 commit comments