GenericBeanDefinition's toString() takes parent definition into account

Issue: SPR-9671
master
Juergen Hoeller 11 years ago
parent 6f2e61b19f
commit 0ef29b204b
  1. 9
      spring-beans/src/main/java/org/springframework/beans/factory/support/GenericBeanDefinition.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2012 the original author or authors. * Copyright 2002-2014 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -89,7 +89,12 @@ public class GenericBeanDefinition extends AbstractBeanDefinition {
@Override @Override
public String toString() { public String toString() {
return "Generic bean: " + super.toString(); StringBuilder sb = new StringBuilder("Generic bean");
if (this.parentName != null) {
sb.append(" with parent '").append(this.parentName).append("'");
}
sb.append(": ").append(super.toString());
return sb.toString();
} }
} }

Loading…
Cancel
Save