Spring集成junit

导入Spring集成Junit坐标

使用RunWith替换原来的运行器

使用@ContextConfiguration指定配置文件或者配置类

使用@Autowired注入需要测试的对象

创建测试

原文地址:https://www.cnblogs.com/maomaodesu/p/12193872.html