Results 1 to 5 of 5

Thread: Turning off dependency checking for a bean created by @component

  1. #1
    Join Date
    Sep 2004
    Posts
    602

    Default 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. #2
    Join Date
    Mar 2007
    Posts
    561

    Default

    @Autowired(required=false)

  3. #3
    Join Date
    Sep 2004
    Posts
    602

    Default

    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.

  4. #4
    Join Date
    Mar 2007
    Posts
    561

    Default

    Have you tried it?

  5. #5
    Join Date
    Sep 2004
    Posts
    602

    Default

    Quote 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •