致力于自定义ChatMessageListeningEndpoint& ChatMessageSendingMessageHandler但面临像
这样的问题SEVERE:异常将上下文初始化事件发送到类的监听器实例org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException:创建名称为' myNotificationListeningEndpoint'在ServletContext资源[/WEB-INF/applicationContext.xml]中定义:init方法的调用失败;嵌套异常是java.lang.IllegalArgumentException:outputChannel是必需的
<int:channel id="gcmInboundNotificationChannel"/>
<int:channel id="gcmOutboundNotificationChannel"/>
<bean id="toGcmTransformer" class="com.test.cardhash.service.AndroidMessageTransformer"/>
<int:chain input-channel="gcmOutboundNotificationChannel">
<bean class="com.test.cardhash.service.MyMessageSendingMessageHandler">
<constructor-arg ref="gcmConnection" />
</bean>
</int:chain>
<int:transformer id="testTransformer" ref="toGcmTransformer" input-channel="gcmInboundNotificationChannel"
method="doTransform" output-channel="gcmOutboundNotificationChannel"/>
<int-xmpp:outbound-channel-adapter
id="gcmOutboundAdapter" channel="gcmOutboundNotificationChannel"
xmpp-connection="gcmConnection" auto-startup="true"/>
<int:chain input-channel="gcmInboundNotificationChannel">
<bean class="com.test.cardhash.service.MyNotificationListeningEndpoint">
<constructor-arg ref="gcmConnection" />
<property name="outputChannel" ref="gcmOutboundNotificationChannel" />
</bean>
</int:chain>
<int-xmpp:inbound-channel-adapter
id="gcmInboundAdapter" channel="gcmInboundNotificationChannel"
xmpp-connection="gcmConnection" extract-payload="true" auto-startup="true" />