<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.7.1</version> <!-- Use the same version as your Spring Boot version -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-spring-junit5</artifactId>
<version>3.14.2.redhat-00067</version> <!-- use the same version as your Camel core version -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.7.1</version> <!-- Use the same version as your Spring Boot version -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-spring-junit5</artifactId>
<version>3.14.2.redhat-00067</version> <!-- use the same version as your Camel core version -->
<scope>test</scope>
</dependency>
Copy to ClipboardCopied!Toggle word wrapToggle overflow
要测试 Camel Spring Boot 应用程序,请使用 @CamelSpringBootTest 给您的测试类标注。这会将 Camel 的 Spring Test 支持引入到应用程序中,以便您可以使用 Spring Boot 测试规则编写测试。