Is it possible to inject a value to a wicket page using spring?
With @Value
it's possible to inject values to a spring bean.
I know the @SpringBean
annotation, but this is only for beans.
My workaround is to wrap the value with a spring bean and then inject this with @SpringBean
to my wicket page. Is there a better way to do this?
We have solved this problem using getter & setter in our custom child of WebApplication
. This child is standard Spring bean and is configured in spring's configuration.
Otherwise you have to create some "config" bean.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With