Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When doing this it is important to remember not to initialize dependencies, to null or any other value, e.g.private ContactDao dao=null;. Don't do this because the injector will run before the subclass initializes its fields, and so the dao=null will override the created proxy with null.

wicket-contrib-spring-annot project provides the SpringComponentInjector class for you. All you have to do to get transparent injection working is to install the injector in your application like shown above. SpringComponentInjector also supports automatic injection of wicket portlet apps.

...