请问这个为啥一直显示我有问题
package com.hkd.hc.com.hkd;
import java.io.IOException;
import java.io.InputStream;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.Test;
import com.hkd.Mapper.UserMapper;
import com.hkd.pojo.User;
public class test {
@Test
public void testInsert() throws IOException {
InputStream is= Resources.getResourceAsStream("sqMapConfigl.xml");
SqlSessionFactoryBuilder sqlSessionFactoryBuilder=new SqlSessionFactoryBuilder();
SqlSessionFactory sqlSessionFactory=sqlSessionFactoryBuilder.build(is);
SqlSession sqlSession=sqlSessionFactory.openSession();
UserMapper mapper=sqlSession.getMapper(UserMapper.class);
//int result=mapper.insert();
User user=new User();
user.setId(8);
user.setPassword("5864");
user.setUsername("巴啦啦");
System.out.println(user);
sqlSession.close();
}
}
package com.hkd.Mapper;
import com.hkd.pojo.User;
public interface UserMapper {
int insert(User user);
}
package com.hkd.hc.com.hkd;
import java.io.IOException;
import java.io.InputStream;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.Test;
import com.hkd.Mapper.UserMapper;
import com.hkd.pojo.User;
public class test {
@Test
public void testInsert() throws IOException {
InputStream is= Resources.getResourceAsStream("sqMapConfigl.xml");
SqlSessionFactoryBuilder sqlSessionFactoryBuilder=new SqlSessionFactoryBuilder();
SqlSessionFactory sqlSessionFactory=sqlSessionFactoryBuilder.build(is);
SqlSession sqlSession=sqlSessionFactory.openSession();
UserMapper mapper=sqlSession.getMapper(UserMapper.class);
//int result=mapper.insert();
User user=new User();
user.setId(8);
user.setPassword("5864");
user.setUsername("巴啦啦");
System.out.println(user);
sqlSession.close();
}
}