Skip to content

Is it possible to add Sqlsessiontemplate function in Spring Batch #488

Open
@pixy032

Description

@pixy032

Now only this way:
MyBatisCursorItemReader reader = new MyBatisCursorItemReader();
reader.setSqlSessionFactory(sqlSessionFactory);
reader.setQueryId("xxx.xxx.xxxx.xxxxxxx.mapper.BatchMstEmployeesEntityMapper.exmapleSelect");
reader.setParameterValues(map);
return reader;

Can it be used like in Spring Boot:
BatchTaskEntityExample selectExample = new BatchTaskEntityExample();
BatchTaskEntityExample.Criteria selectCriteria = selectExample1.createCriteria();
selectCriteria.andTaskStatusEqualTo("processing");
selectCriteria.andStartTimeLessThan(maxTime);
List batchs = batchTaskEntityMapper.selectByExample(selectExample);

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions