Spring 文档汇总

Spring Batch - Reference Documentation
Spring Batch 参考文档中文版
Spring Batch 中文文档

Table 2. JdbcCursorItemReader Properties
ignoreWarnings Determines whether or not SQLWarnings are logged or cause an exception. The default is true (meaning that warnings are logged).
fetchSize Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed by the ResultSet object used by the ItemReader. By default, no hint is given.
maxRows Sets the limit for the maximum number of rows the underlying ResultSet can hold at any one time.
queryTimeout Sets the number of seconds the driver waits for a Statement object to run. If the limit is exceeded, a DataAccessException is thrown. (Consult your driver vendor documentation for details).
verifyCursorPosition Because the same ResultSet held by the ItemReader is passed to the RowMapper, it is possible for users to call ResultSet.next() themselves, which could cause issues with the reader’s internal count. Setting this value to true causes an exception to be thrown if the cursor position is not the same after the RowMapper call as it was before.
saveState Indicates whether or not the reader’s state should be saved in the ExecutionContext provided by ItemStream#update(ExecutionContext). The default is true.
driverSupportsAbsolute Indicates whether the JDBC driver supports setting the absolute row on a ResultSet. It is recommended that this is set to true for JDBC drivers that support ResultSet.absolute(), as it may improve performance, especially if a step fails while working with a large data set. Defaults to false.
setUseSharedExtendedConnection Indicates whether the connection used for the cursor should be used by all other processing, thus sharing the same transaction. If this is set to false, then the cursor is opened with its own connection and does not participate in any transactions started for the rest of the step processing. If you set this flag to true then you must wrap the DataSource in an ExtendedConnectionDataSourceProxy to prevent the connection from being closed and released after each commit. When you set this option to true, the statement used to open the cursor is created with both 'READ_ONLY' and 'HOLD_CURSORS_OVER_COMMIT' options. This allows holding the cursor open over transaction start and commits performed in the step processing. To use this feature, you need a database that supports this and a JDBC driver supporting JDBC 3.0 or later. Defaults to false.

Spring Boot Reference Doc

posted @ 2020-11-06 11:31  satire  阅读(256)  评论(0编辑  收藏  举报