这是测试类package spring.demo1;import javax.annotation.Resource;import org.junit.Test;import org.junit.runner.RunWith;import org.springframework.test.context.ContextConfiguration;import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration("classpath:Configuration.xml")public class springtest {//测试业务类 @Resource(name="accountService") private AccountServiceimp accountServiceimp; @Test public void testdemo1(){ accountServiceimp.transfer("aaa", "bbb", 200d); System.out.println("sdasdasd"); }}然后就爆出 Failed to load ApplicationContext 错误
添加回答
举报
0/150
提交
取消