-
Jun 12th, 2008, 03:34 AM
#1
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 at 03:44 AM.
-
Jun 12th, 2008, 03:37 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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules