You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2013/10/25 10:33:59 UTC

Re: CamelSpringTestSupport registry\bean modification

Hi

Yeah we should make this easier.


I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-6900

On Tue, May 7, 2013 at 9:01 PM, javamonkey79 <ja...@gmail.com> wrote:
> I hope there is a better solution that this, but this works for me:
>
>                 return new FileSystemXmlApplicationContext(
> "./src/main/webapp/WEB-INF/applicationContext.xml" ) {
>                         @SuppressWarnings( "unchecked" )
>                         @Override
>                         public < T > T getBean( final String name, final Class< T > requiredType
> ) {
>                                 if ( name.equals( "baz" ) ) {
>                                         return (T)_bazRef;
>                                 }
>
>                                 return super.getBean( name, requiredType );
>                         }
>                 };
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/CamelSpringTestSupport-registry-bean-modification-tp5732127p5732128.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen