1.引入junit的jar包 (Ctrl+Shirt+Alt+S)

单元测试-springMVC(Idea版)

2.引入注解

@RunWith(SpringJUnit4ClassRunner.class)

@ContextConfiguration(locations={"classpath:spring_context.xml","classpath:spring_shiro.xml"})

public class CMTest {

 

       @Autowired

       privateQuestionOptionService questionOptionService;

 

       @Test

       public void test1(){

         List<QuestionOption> optionsByQid =questionOptionService.getOptionsByQid("1,2,3");

         System.out.println(optionsByQid);

       }

}

 

相关文章:

  • 2022-12-23
  • 2021-12-14
  • 2021-04-30
  • 2021-11-26
  • 2021-12-16
  • 2021-06-17
  • 2021-06-04
  • 2021-09-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-05
  • 2022-01-23
  • 2021-11-28
  • 2021-11-05
相关资源
相似解决方案