Spring Batch 环境设置

– Start
点击此处观看本系列配套视频。


在开始学习 Spring Batch 之前,你需要先创建一个 Maven 项目,然后添加下面的依赖。

  <dependencies>
    <dependency>
        <groupId>org.springframework.batch</groupId>
        <artifactId>spring-batch-core</artifactId>
        <version>4.0.1.RELEASE</version>
    </dependency>
	<dependency>
		<groupId>org.springframework</groupId>
		<artifactId>spring-jdbc</artifactId>
		<version>4.3.17.RELEASE</version>
	</dependency>
    <dependency>
	    <groupId>commons-dbcp</groupId>
	    <artifactId>commons-dbcp</artifactId>
	    <version>1.4</version>
	</dependency>
	<dependency>
	    <groupId>com.oracle</groupId>
	    <artifactId>ojdbc6</artifactId>
	    <version>11.2.0</version>
	</dependency>
  </dependencies>

为了能够使 job 在出错之后在出错的地方继续运行,Spring Batch需要存储 job 的运行状态,下载完 spring-batch-core-4.0.1.RELEASE.jar之后,你可以从中找到相应数据库的建表语句,如本人使用 Oracle 数据库,
/org/springframework/batch/core/schema-oracle10g.sql

更多参见:Spring Batch 精萃
– 声 明:转载请注明出处
– Last Updated on 2018-05-13
– Written by ShangBo on 2017-07-08
– End

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值