我正在关注spring batch admin 。 我想使用数据库来保存元数据值。 我的元数据表已创建,但数据不会进入这些表。它仍然在内存中用于存储元数据。
我知道spring使用MapJobRepositoryFactoryBean
作为jobRepository
bean的实现类来在内存中存储数据,我们必须将其更改为
JobRepositoryFactoryBean
如果我们想在数据库中存储元数据。
但是,即使更改后,我也没有看到任何效果。 (我已经清理并重新编译,没有问题)
我花了一些时间搜索它,但没有成功。有人可以帮忙吗?
我的batch-oracle.properties 文件是-
batch.jdbc.driver=oracle.jdbc.driver.OracleDriver
batch.jdbc.url=jdbc:oracle:thin:@192.168.2.45:1521:devdb
batch.jdbc.user=hsdndad
batch.jdbc.password=isjdsn
batch.jdbc.testWhileIdle=false
batch.jdbc.validationQuery=
batch.drop.script=classpath:/org/springframework/batch/core/schema-drop-oracle10g.sql
batch.schema.script=classpath:/org/springframework/batch/core/schema-oracle10g.sql
batch.business.schema.script=classpath:oracle/initial-query.sql
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer
batch.database.incrementer.parent=sequenceIncrementerParent
batch.lob.handler.class=org.springframework.jdbc.support.lob.OracleLobHandler
batch.grid.size=2
batch.jdbc.pool.size=6
batch.verify.cursor.position=true
batch.isolationlevel=ISOLATION_SERIALIZABLE
batch.table.prefix=BATCH_
最佳答案
After some digging I came to know about the particular convention of properties file(earlier I was giving it name batch-default.properties) . . so now I think it is trying to insert but throwing some SERIALIZABLE exceptions. – Nirbhay Mishra
尝试将 JobRepository 的isolationLevelForCreate 更改为 ISOLATION_READ_COMMITTED
关于java - Spring 批处理管理。元表保持为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36684729/