Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Apache camel-无效数据格式的错误邮件处理_Java_Email_Csv_Apache Camel - Fatal编程技术网

Java Apache camel-无效数据格式的错误邮件处理

Java Apache camel-无效数据格式的错误邮件处理,java,email,csv,apache-camel,Java,Email,Csv,Apache Camel,是否有人可以指导我完成csv文件中无效数据格式的错误电子邮件配置您可以在发送电子邮件的路径中添加异常块。 伪代码示例: onException(Exception.class) .handled(true) .beanRef(CreateErrorMailBean...) .to("smtp://...") end(); 如果您想在不同类型的异常(在您的情况下可能是DataFormatException?)之间有所

是否有人可以指导我完成csv文件中无效数据格式的错误电子邮件配置

您可以在发送电子邮件的路径中添加异常块。 伪代码示例:

        onException(Exception.class)
        .handled(true)
        .beanRef(CreateErrorMailBean...)
        .to("smtp://...")
        end();

如果您想在不同类型的异常(在您的情况下可能是DataFormatException?)之间有所不同,您还可以有一个以上的异常块,您可以在发送电子邮件的路由中添加一个异常块。 伪代码示例:

        onException(Exception.class)
        .handled(true)
        .beanRef(CreateErrorMailBean...)
        .to("smtp://...")
        end();

如果您想在不同类型的异常(在您的情况下可能是DataFormatException?)之间有所不同,您还可以有一个以上的异常块,您可以在发送电子邮件的路由中添加一个异常块。 伪代码示例:

        onException(Exception.class)
        .handled(true)
        .beanRef(CreateErrorMailBean...)
        .to("smtp://...")
        end();

如果您想在不同类型的异常(在您的情况下可能是DataFormatException?)之间有所不同,您还可以有一个以上的异常块,您可以在发送电子邮件的路由中添加一个异常块。 伪代码示例:

        onException(Exception.class)
        .handled(true)
        .beanRef(CreateErrorMailBean...)
        .to("smtp://...")
        end();
如果您想在不同类型的异常之间有所不同(在您的情况下可能是DataFormatException?),那么您还可以有多个异常块