Hi Mathias,

in short: you cant;

the @SpringBean injection is usually done before the class is really created so at a time wicket and spring aren't registered yet;

What you could do (not 100% sure) would be to call a simple proxy-pojo that gets you the data (even maybe a LoadableDetachable one?) during startup - so the firs request to @SpringBean is done after the creation and initalisation of the application class (and the line with the SpringComponentInjector).

Maybe it could also try to use your needed bean without the spring call but instantiate it directly?

Best,

Korbinian

Mathias P.W Nilsson schrieb:
Hi!

I have extended the SpringWebApplication and the init method looks like

addComponentInstantiationListener(new SpringComponentInjector(this));


I want to access my @SpringBean in the init method but it fails. How can I
do this? I need to cache
all users from a webservice in application startup.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to