以前,我们使用Spring Batch 3.0.6并尝试将其更新为4.1.1。我的工作只有一个ItemReader和一个ItemProcessor- 没有ItermWriter提供。更新前运行正常。
现在,我得到:
java.lang.IllegalStateException: ItemWriter must be provided.
与之前的版本相比有何变化?
<job id="myJob" parent="baseJob">
<step id="myStep" parent="baseStep">
<tasklet>
<chunk reader="myItemReader" processor="myProcessor"
commit-interval="1" skip-limit="100000" retry-limit="1">
<skippable-exception-classes>
<include class="ExceptionClass"/>
</skippable-exception-classes>
<retryable-exception-classes>
<include class="ExceptionClass"/>
</retryable-exception-classes>
</chunk>
</tasklet>
<listeners merge="true">
<listener ref="promotionListener"/>
<listener ref="skippableExceptionListener"/>
</listeners>
</step>
</job>
Run Code Online (Sandbox Code Playgroud) 尝试对服务器应用程序启动进行故障排除时,我在旧版Java字节码中发现以下构造。我的IDE反编译了一些第三方库,我很好奇它的有效性-从来没有见过关键字 可以用作字节码中的字段名称。
字节码版本为48.0(Java 1.4)。
public final class f implements UserContext{
private final String try;
private final UserInfo do;
// a lot of code here
public UserInfo getUserInfo(){
return this.do;
}
public String getViewName(){
return this.try;
}
}
Run Code Online (Sandbox Code Playgroud)
好像该库是使用一些混淆功能进行编译的,但是如何在JVM级别上呢?是否允许在JVM启动时没有特殊标志?
更新:该UserInfo字段的正确getter名称是getUserInfo-很抱歉使每个人都对具有不同返回值的方法的模棱两可的命名感到困惑,这是一个复制粘贴问题,因为代码位于没有直接访问该站点的远程计算机上。