一笑寥寥空万古!天涯目送飞鸿去
摘要: 同一个包下:com.com1.IStudentDAO.java简单的加入://小心Insert要大写,小写会出错的,有时后面的括号不要少写 @Insert("insert into student(id,sname,birth,score) values(#{id},#{sname},#{birth},#{score})") public void insert(Student student); //插入2.IStudentDAOTest.java少量代码:String resource = "com/com/mybatis-config.xml"; 阅读全文
posted @ 2013-07-19 18:51 yyy88168 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 同一个包下:com.com数据库简要说明:数据库名:ibatisTest 用户名:sa 密码:yyy字段有:id(int),sname(varchar),birth(Date),score(float)利用的是sqlserver20081.IStudentDAO.java 1 package com.com; 2 3 import java.util.List; 4 5 import org.apache.ibatis.annotations.Insert; 6 public interface IStudentDAO { 7 public ... 阅读全文
posted @ 2013-07-19 18:50 yyy88168 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 第一曲:错误:The TCP/IP connection to the host localhost, port1.这是针对sqlserver:要确保自己的driver:com.micosoft.sqlserver.jdbc.SQLServerDriver url:jdbc:sqlserver://localhost:1433;databaseName=XXXX 上面有驱动大写字母不可小写。 上面的url中的所有字母都可以小写,并且localhoar可以用127.0.0.1或主机名。数据库的名也可以小写 书写的正确。2.有的人... 阅读全文
posted @ 2013-07-19 18:43 yyy88168 阅读(314) 评论(0) 推荐(0) 编辑