我一直在使用Apache Camel
因爲3-4個月Spring 4.0.7.RELEASE
我有一個基於擴展CamelTestSupport
,我在其中使用一些MockEndpoint
小號幾個Camel 2.14.0 TestNG
測試。 我通過重寫createRouteBuilder()
方法來配置路由。從CamelTestSupport遷移到AbstractCamelTestNGSpringContextTests
現在我還需要在其中一個注入一些Spring beans,通過@Autowired
註釋。 通過閱讀http://camel.apache.org/spring-testing.html的內容,我瞭解到我現在必須擴展AbstractCamelTestNGSpringContextTests
,它支持@Autowired
,@DirtiesContext
和@ContextConfiguration
。
雖然我理解所有的MockEndpoint
s爲沒有通過getMockEndpoint()
方法更容易獲得,但是通過使用@EndpointInject
標註,目前尚不清楚對我來說是我該怎麼表達我的路線,因爲createRouteBuilder(
)沒有更多的可用。
我看到可以通過使用註釋來定義生產者和消費者,但我無法理解如何設計路線。
非常感謝社區。