一、项目结构
二、代码实现
1 import java.util.List; 2 import java.util.Map; 3 4 import com.jmu.bean.Student; 5 6 public interface IStudentDao { 7 void insertStudent(Student student); 8 void insertStudentCacheId(Student student);// 插入后获取 9 void deleteStudentById(int id); 10 void updateStudent(Student student); 11 List<Student> selectAllStudents();// 查询所有 12 /* Map<String,Object> selectAllStudentsMap(); */ 13 Student selectStudentById(int id); // 根据id查询 14 List<Student> selectStudentsByName(String name);// 模糊查询 15 }