The camel spring test is for regular spring. Spring boot does things a
bit differently, and we have not integrated with spring boot yet.

There is a related ticket here
https://issues.apache.org/jira/browse/CAMEL-7699

But as Willem says you are welcome to log a ticket about a
camel-spring-boot-test component.

On Sat, Aug 30, 2014 at 9:53 PM, user3152723
<unto.valko...@fifthelement.fi> wrote:
> I’m been trying to use Camel with
> . Spring Boot,
> . test Routes with “@RunWith(CamelSpringJUnit4ClassRunner.class)”
> .with    @Produce(uri = "direct:in")
>     private ProducerTemplate producerTemplate;
> .and    @EndpointInject(uri = "mock:out")
>     private MockEndpoint out;
>
> I’m not an experienced Spring specialist (Spring Boot seems like endless
> labyrinth to me, with all of its @ContextConfiguration annotations).
>
> I’ve tested CamelSpringJUnit4ClassRunner using 2.14-SNAPSHOT version of
> Camel. Is it supposed to work, or is there something not completed in Spring
> 4 support?
>
> I wondered if anybody has working example code to share. It would be of lots
> of help – waiting for release of 2.14, because we have decided to use Spring
> Boot in our project – and hopefully Camel embedded.
>
> My  last effort:
>
> @RunWith(CamelSpringJUnit4ClassRunner.class)
> //@ContextConfiguration(classes = Application.class)
> @ContextConfiguration(classes = {Application.class, MyRouteBuilder.class},
> loader = SpringApplicationContextLoader.class)
> public class TestinGcamel_2 {
>
>
>     @Autowired
>     ApplicationContext ctx;
>
>     @Autowired
>     CamelContext camelContext;
>
>     @Produce(uri = "direct:in")
>     private ProducerTemplate producerTemplate;
>
>     @EndpointInject(uri = "mock:out")
>     private MockEndpoint mockOut;
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/CamelSpringJUnit4ClassRunner-with-Spring-Boot-tp5755876.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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

Reply via email to