A、
搭建自定义mvc
框架
B、
E
ntity
C、
优化baseDao
(增删改的重复性代码太多)
BaseDao
的加强版
public int executeUpdate(String sql, String[] attrs, T t) throws SQLException, InstantiationException, IllegalAccessException, NoSuchFieldException, SecurityException{
Connection con = DBAccess.getConnection();
PreparedStatement pst = con.prepareStatement(sql);
Field f = null;
int i = 1;
for (String attr : attrs) {
f = t.getClass().getDeclaredField(attr);
f.setAccessible(true);
pst.setObject(i++, f.get(t));
}
return pst.executeUpdate();
}
D、
dao
层之增删改查
E、
web
层
F、
配置action
G、
导入自定义标签库(标签助手类、tld
文件、
jsp
)
H、
J
sp
页面
备案号:湘ICP备19000029号
Copyright © 2018-2019 javaxl晓码阁 版权所有