小编cex*_*yat的帖子

当本地/开发时,Git将origin/master分支拉到local/master

我在开发分公司工作.有时,当我想将更改推送到原点时,git说,origin/master分支有一些变化.

如何将更改从远程主服务器提取到本地主服务器而无需结帐到本地主服务器?

git branch

19
推荐指数
1
解决办法
3万
查看次数

Camel - Split()和doCatch(....)不起作用

我正在尝试构建一个尝试验证xml的路由,如果一切正确,则必须拆分此文件,否则抛出异常并且必须执行其他操作.所以我做了以下事情:

from("file:"+fileOutboxTransformed+"?preMove=inprogress&move="+backupFolderTransformed+"/"+labelMessageType+"_${date:now:yyyyMMddHHmmssSSS}-${file:name.noext}.${file:ext}")
    .log(LoggingLevel.INFO, "Got transformed file and sending it to jms queue: "+queue)
    .doTry()
        .to("validator:classpath:"+validator)
        .split(xPathMessageTypeSplit)
        .to("jms:"+queue+"?jmsMessageType=Text")
    .doCatch(ValidationException.class)
        .log(LoggingLevel.INFO, "Validation Exception for message ${body}")
        .to("xslt:classpath:"+transformationsErrorAfter)
        .split(xPathNotificationSplit)
        .to("file:"+fileOutboxInvalid+"?fileName=${file:name.noext}-${date:now:yyyyMMddHHmmssSSS}.err2")
    .end();
Run Code Online (Sandbox Code Playgroud)

但它不编译(如果我不使用拆分然后它编译和工作),错误是:

The method doCatch(Class<ValidationException>) is undefined for the type ExpressionNode
Run Code Online (Sandbox Code Playgroud)

所以我尝试了以下内容

from("file:"+fileOutboxTransformed+"?preMove=inprogress&move="+backupFolderTransformed+"/"+labelMessageType+"_${date:now:yyyyMMddHHmmssSSS}-${file:name.noext}.${file:ext}")
    .log(LoggingLevel.INFO, "Got transformed file and sending it to jms queue: "+queue)
    .doTry()
        .to("direct:validate")
    .doCatch(ValidationException.class)
        .log(LoggingLevel.INFO, "Validation Exception for message ${body}")
        .to("xslt:classpath:"+transformationsErrorAfter)
        .split(xPathNotificationSplit)
        .to("file:"+fileOutboxInvalid+"?fileName=${file:name.noext}-${date:now:yyyyMMddHHmmssSSS}.err2")
    .end();

    from("direct:validate")
        .to("validator:classpath:"+validator)
        .to("direct:split_message");

    from("direct:split_message")
        .split(xPathMessageTypeSplit)
        .to("jms:"+queue+"?jmsMessageType=Text");
Run Code Online (Sandbox Code Playgroud)

这次我得到重复端点的错误

 org.apache.camel.FailedToStartRouteException: Failed to start route route312 because of Multiple …
Run Code Online (Sandbox Code Playgroud)

apache-camel

3
推荐指数
1
解决办法
2730
查看次数

标签 统计

apache-camel ×1

branch ×1

git ×1