userupdate.java
来自「自己做的关于spring框架的使用」· Java 代码 · 共 24 行
JAVA
24 行
package myspring.v3.jdbc.object;
import java.sql.Types;
import javax.sql.DataSource;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.object.SqlUpdate;
public class UserUpdate extends SqlUpdate{
public UserUpdate(DataSource dataSource){
this.setDataSource(dataSource);
this.setSql("update spring_user set username =?, password=? where id=?");
this.declareParameter(new SqlParameter(Types.VARCHAR));
this.declareParameter(new SqlParameter(Types.VARCHAR));
this.declareParameter(new SqlParameter(Types.INTEGER));
this.compile();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?