junit
LYW_lyw
这个作者很懒,什么都没留下…
展开
-
sts-junit学习篇-mockMVC传输@RequestBody数据解决办法
1.一个例子:import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.junit.Before;import org.junit.runner.RunWith;import org.springframework.beans.factory.annotat...转载 2020-02-24 15:47:59 · 664 阅读 · 0 评论 -
sts-Junit学习篇之mockMvc
1.sts自动生成测试类选择要生成测试类的文件,右键->new->Junit test case或者右键->new->other->Java->junit test case2.类名上添加的注解(1)首先测试Controller类时,在类名上加入注解@RunWith和@WebMvcTest,@ActiveProfiles("test")@RunW...原创 2020-02-24 15:05:24 · 652 阅读 · 0 评论