SpringMybatis 分页读取数据库数据
程序员文章站
2022-06-30 12:32:35
1.ORACLE SQL select * from table where xxx order by xxxx OFFSET #{_skiprows} ROWS FETCH FIRST #{_pagesize} ROWS ONLY2.xml配置
1.ORACLE SQL
select * from table where xxx order by xxxx
OFFSET #{_skiprows} ROWS FETCH FIRST #{_pagesize} ROWS ONLY
2.xml配置
<bean id="itemReader" class="org.mybatis.spring.batch.MyBatisPagingItemReader"
p:queryId="oxxxx.querySql"
p:sqlSessionFactory-ref="sqlSessionFactoryl"
scope="step">
<property name="parameterValues">
<map>
<entry key="JobID" value="#{jobParameters['JobID']}">
</entry>
</map>
</property><property name="pageSize" value="1000"/>
</bean>
本文地址:https://blog.csdn.net/piao208/article/details/107668895
下一篇: 人工智能法甲分析报告:揭秘巴黎独霸原因