MyBatisCursorItemReader Mapper方法上的注解失效问题
public MyBatisCursorItemReader readerBib(LibDatasource libDatasource) {
MyBatisCursorItemReader reader = new MyBatisCursorItemReader();
reader.setQueryId("com.xxx.mapper.XxxMapper.getXxx");// 方法上加了@DS注解
Map<String, Object> params = new HashMap<>();
params.put("code", libDatasource.getCode());
params.put("tmp", libDatasource.getBib());
reader.setParameterValues(params);
reader.setSqlSessionFactory(sqlSessionFactory);
return reader;
}
public interface XxxMapper {
@DS("#code")
List<XxxDto> getXxx(String code, @Param("tmp") String tmp);
}