Java Web Project实践项目 —— Meeting Management System会议管理系统 【Part1— VO+Util+DAO】

Meeting Management System 会议管理系统此项目涉及:【未涉及框架】前端:HTML + CSS + JS后端:JSP + Servlet + JDBC数据库:Oracle开发工具:Eclipse + 数据库第三方软件:PL / SQL Developerjar包分层 VOUtil DAOServiceServletFilterListener...
摘要由CSDN通过智能技术生成

Meeting Management System 会议管理系统

此项目涉及:【未涉及框架】

  • 前端:HTML + CSS + JS
  • 后端:JSP + Servlet + JDBC
  • 数据库:Oracle
  • 开发工具:Eclipse + 数据库第三方软件:PL / SQL Developer
  • jar包
  • 分层
    • VO
    • Util
    • DAO
    • Service
    • Servlet
    • Filter
    • Listener

各层名字只是随意取的

Name 别名 用途
VO Bean,Domain,Entity 实体类
Util / 工具/功能层
DAO / 数据操作层
Service / 业务逻辑层
Servlet / 控制层
Filter / 过滤器
Listener / 监听器

其他

除了必备的专业知识,你还应该会

  1. Alt键+/ 的快捷方式(真的还有很多人不知道……)
  2. 代码查错
  3. Java 3.0 与以往版本相比之下的优势

前期准备

数据库建表:

  1. 部门表meetingdept
  2. 员工表meetingemp
  3. 会议室表meetingroom

涉及知识点回忆

JDBC

  • 数据库连接方法
  • JDBC API
    • Connection接口
    • Statement接口
    • ResultSet接口
  • 预处理语句
    • PreparedStatement对象
  • 连接池与数据源

代码区

一:VO:
1. Dept类

public class Dept {
   

    //声明属性
    private int deptid;
    private String deptname;

    //set get
    public int getDeptid() {
        return deptid;
    }
    public void setDeptid(int deptid) {
        this.deptid = deptid;
    }
    public String getDeptname() {
        return deptname;
    }
    public void setDeptname(String deptname) {
        this.deptname = deptname;
    }

    //全参构造器
    public Dept(int deptid, String deptname) {
        super();
        this.deptid = deptid;
        this.deptname = deptname;
    }
    //无参构造器
    public Dept() {
        super();
    }

    //提供tostring
    @Override
    public String toString() {
        return "Dept [deptid=" + deptid + ", deptname=" + deptname + "]";
    }
}

2.Emp类

public class Emp {
   
    //声明属性
    private int empId;
    private String empName;
    private String username;
    private String password;
    private String phone;
    private String email;
    private int deptid;
    private String status;

    //提供set  get  构造器  toString
    public int getEmpId() {
        return empId;
    }
    public void setEmpId(int empId) {
        this.empId = empId;
    }
    public String getEmpName() {
        return empName;
    }
    public void setEmpName(String empName) {
        this.empName = empName;
    }
    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    public int getDeptid() {
        return deptid;
    }
    public void setDeptid(int deptid) {
        this.deptid = deptid;
    }
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }


    public Emp(int empId, String empName, String username, String password,
            String phone, String email, int deptid, String status) {
        super();
        this.empId = empId;
        this.empName = empName;
        this.username = username;
        this.password = password;
        this.phone = phone;
        this.email = email;
        this.deptid = deptid;
        this.status = status;
    }
    public Emp() {
        super();
    }


    @Override
    public String 
  • 1
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值