xml

    <insert >

      insert into
        student(sname,sage,ssex)
      VALUES
        (s.name,s.sage,s.ssex)

    </insert>

  Mapper:

    public void insert(@Param("s")Student s);

  ServiceImp:

    Student s=new Student("小明","18","男")

    mapper.insert(s);

    System.out.println(s.getId())

 

相关文章: