예제 #1
0
 // mybatis²âÊÔ
 @Test
 public void testSelect() {
   EmpDao empDao = new EmpDao();
   List<EmpEntity> list = empDao.findAll();
   for (EmpEntity empEntity : list) {
     System.out.println(empEntity.getEmpName());
   }
 }
예제 #2
0
 // spring²âÊÔ
 @Test
 public void testSelect2() {
   ApplicationContext ac = new ClassPathXmlApplicationContext(new String[] {"spring.xml"});
   EmpDao empDao = (EmpDao) ac.getBean("empDaoID");
   /*List<EmpEntity> list=empDao.findAll();
   for (EmpEntity empEntity : list) {
   	System.out.println(empEntity.getEmpName());
   }*/
   List<EmpEntity> list = empDao.findByPage(0, 3);
   for (EmpEntity empEntity : list) {
     System.out.println(empEntity.getEmpName());
   }
 }