OK, your test doesnt test anything Wicket related, and is purely a Spring
application.

In order to use Spring in a wicket app, you need to check out some of the
articles on the web - Google for "Wicket spring application" and there are
several full working examples of how to use Spring in a Wicket application.

Primarily you have to initialize the Spring app context in the web.xml via
a ContextLoaderListener, and then in your Wicket Application's init()
method, you need to add a SpringComponentInjector as a listener.  Then as I
mentioned a few days back, you need to use @SpringBean to annotate the
fields you want autowired.  There are a handful of other cases where you
will have to trigger the bean injection manually, but get your basic app
working first with Spring.

N


On Sun, May 12, 2013 at 12:34 AM, ORACLEADF <[email protected]> wrote:

> Hi Nick
> Thank you.
> I create a file applicationContext.xml like the following pic and I use it
> in DAO and BO classes :
> applicationContext.xml_.png
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4658733/applicationContext.xml_.png
> >
>
> and I tested it using public static void main like the following pic :
> psvm.png <
> http://apache-wicket.1842946.n4.nabble.com/file/n4658733/psvm.png>
>
>
>
>
> -----
> Regards
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Spring-Autowire-not-working-tp4658728p4658733.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to