mybatis

一、 入门开发步骤

java web开发入门七(mybatis)基于intellig idea

 

 

 

 

1.导入相关jar包

mybatis3.4.2核心开发包

asm-5.1.jar
cglib-3.2.4.jar
commons-logging-1.1.3.jar
log4j-1.2.17.jar
mybatis-3.4.2.jar

mysql驱动包

mysql-connector-java-5.1.7-bin.jar

2.定义实体及实体映射文件

定义member实体

package com.eggtwo.entity;


import java.math.BigDecimal;
import java.util.Date;

public class Member {
    private int id;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    private String name;
    private int age;
    private Date birthday;
    private boolean man;
    private BigDecimal score;

    public BigDecimal getScore() {
        return score;
    }

    public void setScore(BigDecimal score) {
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public boolean isMan() {
        return man;
    }

    public void setMan(boolean man) {
        this.man = man;
    }
}
View Code

相关文章:

  • 2021-08-21
  • 2021-06-01
  • 2021-08-06
  • 2021-06-06
  • 2022-01-06
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
猜你喜欢
  • 2021-10-26
  • 2021-08-10
  • 2022-01-21
  • 2021-06-14
  • 2022-01-01
  • 2021-08-24
相关资源
相似解决方案