我想知道我们需要在public void setQueryTimeout(int queryTimeout)
中的jdbcTemplate
中传递什么类型的值。文件说
> Set the query timeout for statements that this JdbcTemplate executes.
> <p>Default is -1, indicating to use the JDBC driver's default (i.e. to
> not pass a specific query timeout setting on the driver). <p>Note: Any
> timeout specified here will be overridden by the remaining transaction
> timeout when executing within a transaction that has a timeout
> specified at the transaction level. @see
> java.sql.Statement#setQueryTimeout
想知道queryTimeout是milliseconds
,seconds
还是minutes
[从setQueryTimeout()
类检查了相似的java.sql.Statement
后,我猜测它们的行为相同。
setQueryTimeout(int seconds)
解决类似问题的一个好方法是在互联网上查看一个可行的示例。它很有帮助!