1. 建立DAO接口:
package com.pro.db;
import java.util.List;
import com.pro.bean.Users;
public interface DAOInter {
public void insert(Users user) throws Exception;
public void update(Users user) throws Exception;
public void delete(int userid) throws Exception;
public Users queryById(int userid) throws Exception;
public List queryAll() throws Exception;
}
2.接口实现类:
…………
3.servlet等
以后更新