Announcement Announcement Module
Collapse
No announcement yet.
Why there is toString() call after bean initalizated? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why there is toString() call after bean initalizated?

    I just find that spring will call toString() after bean created (finished constructor call) and before setting properties (call setter to press beans to properties). If any methods of those properties called at the toString() method, you will get NullPointerException

  • #2
    I guess you are not yet using Spring 2.0 RC 4? There was such an issue in former versions, but it has been fixed:

    Code:
    AbstractAutowireCapableBeanFactory only logs name and class of eagerly cached bean (does not trigger toString anymore)
    Otherwise you would need to provide some more information like stacktrace.

    Jörg

    Comment

    Working...
    X