2020.6.27 9:17
@RunWith(SpringJunit4ClassRunner.class) //该注解表示会帮我们创建容器
@ContextConfiguration("classpath:applicationContext.xml") //指定的xml路径
public class test{
@Resource(name="user") //将名为user的对象注入到u变量中
public User u;
@Test
public void fun(){
...
}
}