注解测试

配制文件要放到测试的资源文件当中

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath*:spring/data-knet.xml","classpath*:spring/applicationContext.xml"})
public class DatajunitTest extends AbstractJUnit4SpringContextTests{
  @Resource
  private IKnetService knetService;
  
  @Test
  public void aa(){
      knetService.test();
  }
}

 

相关文章:

  • 2021-09-26
  • 2022-12-23
  • 2021-05-30
  • 2021-11-03
  • 2021-08-18
  • 2021-10-13
猜你喜欢
  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2021-06-04
  • 2021-04-12
相关资源
相似解决方案