Announcement Announcement Module
Collapse
No announcement yet.
Turning off dependency checking for a bean created by @component Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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"

  • #2
    @Autowired(required=false)

    Comment


    • #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.

      Comment


      • #4
        Have you tried it?

        Comment


        • #5
          Originally posted by spgmx View Post
          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.

          Comment

          Working...
          X