还有mapper:
<mapper namespace="yuhantao">
<insert id="insertStudent" parameterType="yuhantao.Students" useGeneratedKeys="true" keyProperty="id">
insert into students_information (name,Gender,Major,Grade,Address,Telephone,time,create_date)
values (#{name},#{Gender},#{Major},#{Grade},#{Address},#{Telephone},#{time},#{create_date})
</insert>
<select id="selectStudent" parameterType="int" resultType="Students">
select * from students_information where id=#{id}
</select>
</mapper>
<mapper namespace="yuhantao">
<insert id="insertStudent" parameterType="yuhantao.Students" useGeneratedKeys="true" keyProperty="id">
insert into students_information (name,Gender,Major,Grade,Address,Telephone,time,create_date)
values (#{name},#{Gender},#{Major},#{Grade},#{Address},#{Telephone},#{time},#{create_date})
</insert>
<select id="selectStudent" parameterType="int" resultType="Students">
select * from students_information where id=#{id}
</select>
</mapper>
解决方案 »
- 尚学堂oa用test包测试类为数据库装载数据时发生错误
- 求解啊,怎么把红色的方块放到集合里。算法大神求帮忙啊
- hibernate 一对多 查询怎么去掉重复数据?
- 初学hibernate,高手请进,指点一下。
- java.net.URL类的用法
- 请问struts1.38后版本是否取消了struts-bean.tld文件
- 紧急求助高人(tomcat服务中的stdout.log问题)
- thomaschen2046
- 快速入门struts
- 怎样能在servlet中同时支持dopost,doget?
- 在struts2的action类中获取ognl表达式中的多选框中被选中值
- java发送post请求需要注意的问题
http://blog.csdn.net/jelly_8090/article/details/8129529 这个例子不知道可否满足你的需求。