导入spring-test-5.1.9.RELEASE.jar @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:applicationContext.xml") public class TestDemo { @Resource(name = "userService") private IUserService userService; @Test public void run1(){ userService.saveUser(); } }
08-31