Spring随笔(03)

1、Spring测试

  

  @RunWith(SpringJUnit4ClassRunner.class)  // 告诉把Spring容器运行在JVM中

  // 若配置文件名=当前测试类名-context.xml,就可以在当前路径找
  @ContextConfiguration({"/spring/applicationContext.xml"}) // 加载配置文件,默认从当前路径去找
  public class BaseJunit4Test {
  }

原文地址:https://www.cnblogs.com/luomsg/p/6406957.html