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(){
...
}
}