1.引入junit的jar包 (Ctrl+Shirt+Alt+S)
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);
}
}