Hi, use a different applicationContext.xml that is used for integration testing.
(use maven profiles for using different resource path pointing to different applicationContext.xml files). You cannot use WebApplication.getConfigurationType() as you need a preloaded spring configuration before your WebApplication is instantiated. Best Regards, Ilja Pavkovic Am Donnerstag, 7. Januar 2010 23:05:23 schrieb Liam Clarke-Hutchinson: > Hi all, > > This is probably more of a Spring question than a Wicket question, but I'm > asking here in the hopes that someone else has done this before. Basically, > we have a page that uses the @SpringBean annotation to inject a credit card > validation service. At the moment, when we're developing, it's injecting > the actual service, that then goes off to our card processor and validates > the card etc. For integration testing etc. I want to avoid this, so I've > created a simple implementation of the validation service that always > returns true. Question I have, is how can I provide this bean instead of > the real bean, based on the value of > WebApplication.getConfigurationType()? > > The obvious solution for me would be to do it in the initialization of our > WicketApplication - we already have a "if we're in development mode" > section where we output component paths and turn on request logging and > session size recording etc. is there a way I can programmatically provide > my bean at this point? Or am I going about this entirely the wrong way? > > Many thanks for any advice offered, > > Regards, > > Liam Clarke > -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org