
或者,要进行集成测试。
@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration(locations={"/applicationContext-test.xml"})@Transactionalpublic class MyTest { @Resource(name="myService") public IMyService myService;然后像往常一样使用该服务。将应用程序上下文添加到您的test / resources目录中
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)