首页
技术
登录
6mi
u
盘
搜
搜 索
技术
SpringBoot做单元测试爆空指针NullPointerException
SpringBoot做单元测试爆空指针NullPointerException
技术
2022-07-16
71
debug测试类发现异常出现在service调用接口方法上,其他地方没有问题,最后发现是因为测试类上没有加上SpringBoot专有的测试注解:
@SpringBootTest @RunWith(SpringRunner.class)
加上就没问题了。
转载请注明原文地址:https://ipadbbs.8miu.com/read-28443.html
最新回复
(
0
)