在我的应用程序中,需要模拟JmsTemplate以进行集成测试。
在我的appcontext.xml文件中:
需要在我的testcontext.xml中模拟jmstemplete。 提前致谢。
在我的appcontext.xml文件中:
<bean id="core_connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate">
<ref bean="core_jndiTemplate" />
</property>
<property name="jndiName">
<value>ConnectionFactory</value>
</property>
</bean>
<bean id="core_jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="core_connectionFactory" />
<property name="defaultDestination" ref="core_destination" />
</bean>
<bean id="core_destination" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate">
<ref bean="core_jndiTemplate" />
</property>
<property name="jndiName">
<value>queue/CoreQueue</value>
</property>
</bean>
需要在我的testcontext.xml中模拟jmstemplete。 提前致谢。