Spring Boot Apache Camel Routes testing

后端 未结 4 471
粉色の甜心
粉色の甜心 2020-12-06 15:57

I have a Springboot application, where I have some camel routes configured.

public class CamelConfig {
private static final Logger LOG = LoggerFactory.getLog         


        
4条回答
  •  青春惊慌失措
    2020-12-06 15:59

    Did you try using Camel test runner?

    @RunWith(CamelSpringJUnit4ClassRunner.class)
    

    If you are using camel-spring-boot dependency, you may know that it uses auto configuration to setup Camel:

    CamelAutoConfiguration.java
    

    It means that you may also need to add @EnableAutoConfiguration to your test.

提交回复
热议问题