2013-04-11 84 views
0

我想在接口层中引入单元测试。
在代码中,我们提供<from:sedaQueueName>,骆驼解析消息并将其发送到外部系统。 我想将路线<to:ExternalSystem>更改为<to:PrintMessageOnScreen>
我已经使用静态全局值isUnitTest来获取容器外的数据库连接。
有没有一种方法可以在应用程序上下文中使用相同的变量值来决定我的路线?
我可以使用Spring SL这样的访问属性值:基于静态属性值的骆驼路由设置测试

<bean id="forTesting" class="test.UnitTest"> 
     <property name="isUnitTest"> 
      <value>#{T(test.UnitTest).isUnitTest}</value> 
     </property> 
    </bean> 

我不知道如何读驼路中这个属性,并决定根据其值我的路线。

回答