@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration("classpath:applicationContext.xml")publicclassTestPersonServiceSpring{
@Autowired
IPersonService personService;@Autowired@Qualifier("personDaoImpl")
IPersonDao personDao;@Testpublicvoidtest01(){
System.out.println(personService);//调了一个login
Person person =newPerson();boolean flag = personService.login(person);
System.out.println(flag);}@Testpublicvoidtest02(){
Person person =newPerson();boolean f = personDao.findByUserNameAndPassword(person);
System.out.println(f);}}