Java spring集成错误消息路由是如何工作的?

Java spring集成错误消息路由是如何工作的?,java,error-handling,spring-integration,Java,Error Handling,Spring Integration,我已将我的spring integration应用程序配置为管理以下错误: <exception-type-router resolution-required="true" default-output-channel="errorChannelStop" input-channel="error-manager"> <mapping exception-type="org.springframework.xml.validation.XmlValidationExc

我已将我的spring integration应用程序配置为管理以下错误:

<exception-type-router resolution-required="true" default-output-channel="errorChannelStop" input-channel="error-manager">
    <mapping exception-type="org.springframework.xml.validation.XmlValidationException" channel="formatErrorMessageChannel" />
</exception-type-router>

为什么?

您需要确保向
错误管理器
发送消息。仅仅抛出一个异常并不能使所有操作都与您的错误通道相冲突

有关更多信息,请参阅文档:

org.springframework.xml.validation.XmlValidationException: Could not validate source: The element type "messageType" must be terminated by the matching end-tag "</messageType>".; 
    nested exception is org.xml.sax.SAXParseException; line number: 9; columnNumber: 24; The element type "message Type" must be terminated by the matching end-tag "</messageType>".
    ...
Caused by: org.xml.sax.SAXParseException: The element type "message Type" must be terminated by the matching end-tag "</messageType>".