Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    In fact, using constructor injection has the side benefit of making your poorly-designed beans painfully obvious because of the huge constructors. JDK dynamic proxies don't need default constructors. Other frameworks are heading away from default constructors or requiring only a private one. Field injection is my second choice, but then there's the tests... Commented Oct 16, 2011 at 21:53
  • yup, for tests there's ReflectionTestUtils. Which is a bit ugly though Commented Oct 16, 2011 at 21:59