-
Jul 13th, 2012, 06:35 AM
#1
Turning off dependency checking for a bean created by @component
How do you turn off dependency checking for a bean defined by @component ?
It's easy for a bean defined in XML : dependency-check="none"
-
Jul 13th, 2012, 10:30 AM
#2
@Autowired(required=false)
-
Jul 13th, 2012, 11:33 AM
#3
Not quite. The scenario is
a bean with a getter and a setter on it, annotated by @component
the context fails to start as Spring is attempted to wire up the bean by calling the String setter. I want to turn off this behaviour some that the dependencies of the said been don't have to be present when the container starts.
-
Jul 14th, 2012, 04:22 AM
#4
-
Jul 16th, 2012, 09:08 AM
#5

Originally Posted by
spgmx
Have you tried it?
Ah, you mean at the setter level ? No I haven't, I'm passed that error now, but if I come across the scenario again I will. Thanks.
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