simplejdbcdaosupportimpl.java
来自「随书光盘:精通Sping 2.0 的随书源代码」· Java 代码 · 共 33 行
JAVA
33 行
package org.springframework.samples;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport;
/**
*
* @author worldheart
*
*/
public class SimpleJdbcDaoSupportImpl extends
SimpleJdbcDaoSupport implements ISimpleJdbcDaoSupport {
protected static final Log log = LogFactory
.getLog(SimpleJdbcDaoSupportImpl.class);
public void operationAll() {
log.info(this.getJdbcTemplate());
log.info(this.getSimpleJdbcTemplate().
queryForInt("select count(*) from owners where first_name = ? and last_name = ?"
,"Shifei","Luo"));
log.info(this.getSimpleJdbcTemplate().
queryForInt(
"select count(*) from owners where first_name = ? " +
"and last_name = ? and telephone = ?"
,"Shifei","Luo", "16068008"));
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?