On 9/18/07, John Krasnay <[EMAIL PROTECTED]> wrote:
>
>
> public class MyPage extends WebPage {
>
>     @SpringBean
>     public SomeService someService;
>
>     public MyPage() {
>         someService.doSomething();
>     }
> }
>
> Using an annotation instead of calling createSpringBeanProxy directly
> allows me to manually inject test instances of my services/business
> delegates to do unit tests.


Yea, I'd like to use the annotation but I believe that's only working when
running under Java5? (sadly, this app has to run on an old websever that is
using Java4.) (The annotation is in the wicket-contrib-spring-jdk5 so I just
figured it required Java5 - but I'm not positive of that requirement - can
someone confirm ? )

Also, where you mention "allows me to manually inject test instances of my
services/business
delegates to do unit tests." - I get the same benefit with the proxy
approach which is why I'm using Spring in the first place:) - it's just
slightly more verbose, although if I use the 'createSpringBeanProxy' from my
Base application class it's really only one line so it's not 'that' bad -
unless there is something else that annotation approach gives me that I'm
missing?

Reply via email to