spring自带测试配置

spring自带的测试注解

@ContextConfiguration(locations="classpath:applicationContext.xml")
@RunWith(SpringJUnit4ClassRunner.class)

public class TestUserDaoImpl extends AbstractJUnit4SpringContextTests{

  @Autowired
  UserDao userDao;

  //TODO

}

classpath:applicationContext.xml---为你当前配置的.XML文件名

上一篇:Array.prototype.map()和Array.prototypefilter()


下一篇:Array.prototype.map()方法详解