10. Spring集成Junit

知识要点 Spring集成Junit步骤

① 导入spring集成Junit的坐标

② 使用@Runwith注解替换原来的运行期

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

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

⑤ 创建测试方法进行测试

emmm 看步骤即可 ,具体的不想写

posted @ 2021-06-25 17:55  咸瑜  阅读(61)  评论(0编辑  收藏  举报