public class JdbcTemplate
extends org.springframework.jdbc.core.JdbcTemplate
| 构造器和说明 |
|---|
JdbcTemplate() |
JdbcTemplate(DataSource dataSource)
Construct a new JdbcTemplate, given a DataSource to obtain connections from.
|
JdbcTemplate(DataSource dataSource,
boolean lazyInit)
Construct a new JdbcTemplate, given a DataSource to obtain connections from.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected DataSource |
dataSource()
supports for under 5.0
|
<T> T |
query(org.springframework.jdbc.core.PreparedStatementCreator psc,
org.springframework.jdbc.core.PreparedStatementSetter pss,
org.springframework.jdbc.core.ResultSetExtractor<T> rse)
Pagination for PreparedStatement
|
<T> T |
query(String sql,
org.springframework.jdbc.core.ResultSetExtractor<T> rse)
Pagination for Statement
|
void |
setInstrumentConfig(SQLInstrumentorConfig instrumentConfig) |
void |
setPaginationConfig(JdbcTemplatePaginationProperties paginationConfig) |
protected org.springframework.dao.DataAccessException |
translateException(String task,
String sql,
SQLException ex)
for Spring 4.x
|
applyStatementSettings, batchUpdate, batchUpdate, batchUpdate, batchUpdate, batchUpdate, call, createConnectionProxy, createResultsMap, execute, execute, execute, execute, execute, execute, execute, extractOutputParameters, extractReturnedResults, getColumnMapRowMapper, getFetchSize, getMaxRows, getNativeJdbcExtractor, getQueryTimeout, getSingleColumnRowMapper, handleWarnings, handleWarnings, isIgnoreWarnings, isResultsMapCaseInsensitive, isSkipResultsProcessing, isSkipUndeclaredResults, newArgPreparedStatementSetter, newArgTypePreparedStatementSetter, processResultSet, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, queryForList, queryForList, queryForList, queryForList, queryForList, queryForList, queryForList, queryForMap, queryForMap, queryForMap, queryForObject, queryForObject, queryForObject, queryForObject, queryForObject, queryForObject, queryForObject, queryForObject, queryForRowSet, queryForRowSet, queryForRowSet, setFetchSize, setIgnoreWarnings, setMaxRows, setNativeJdbcExtractor, setQueryTimeout, setResultsMapCaseInsensitive, setSkipResultsProcessing, setSkipUndeclaredResults, update, update, update, update, update, update, updatepublic JdbcTemplate()
public JdbcTemplate(DataSource dataSource)
Note: This will not trigger initialization of the exception translator.
dataSource - the JDBC DataSource to obtain connections frompublic JdbcTemplate(DataSource dataSource, boolean lazyInit)
Note: Depending on the "lazyInit" flag, initialization of the exception translator will be triggered.
dataSource - the JDBC DataSource to obtain connections fromlazyInit - whether to lazily initialize the SQLExceptionTranslatorpublic void setPaginationConfig(JdbcTemplatePaginationProperties paginationConfig)
public void setInstrumentConfig(SQLInstrumentorConfig instrumentConfig)
protected DataSource dataSource()
public <T> T query(String sql, org.springframework.jdbc.core.ResultSetExtractor<T> rse) throws org.springframework.dao.DataAccessException
query 在接口中 org.springframework.jdbc.core.JdbcOperationsquery 在类中 org.springframework.jdbc.core.JdbcTemplateorg.springframework.dao.DataAccessExceptionpublic <T> T query(org.springframework.jdbc.core.PreparedStatementCreator psc,
org.springframework.jdbc.core.PreparedStatementSetter pss,
org.springframework.jdbc.core.ResultSetExtractor<T> rse)
throws org.springframework.dao.DataAccessException
query 在类中 org.springframework.jdbc.core.JdbcTemplateorg.springframework.dao.DataAccessExceptionprotected org.springframework.dao.DataAccessException translateException(String task, String sql, SQLException ex)
Copyright © 2020. All rights reserved.