关于Spring框架,@Runwith报红问题


父项目中有


junit
junit
4.12
test

子项目中有

org.springframework
spring-test
5.3.13


而使用注解@RunWith和@Test报红
我的理解是没有引入到父项目的依赖,所以我的解决办法是加

Com.Ren
SpringExercise02
1.0-SNAPSHOT


当然也可以在子项目中重新添加依赖

相关