Announcement Announcement Module
Collapse
No announcement yet.
For injection, setter and constructor should be public ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • For injection, setter and constructor should be public ?

    Simple question

    Should setter or constructor be public for dependency injection ?

    It seems to be doubtless, but is not explicitly stated anywhere in reference manual.
    Why don't you clarify that in reference manual.
    Last edited by 3rdstage; Jun 12th, 2008, 03:44 AM.

  • #2
    Constructors can be anything, spring uses reflection for that so you could go with private constructors. The setters have to be public, we use the normal Property stuff which ships with the JDK.

    Comment

    Working...
    X