版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zy1104560031/article/details/84255550
使用Junit测试Controller类时出现了service与controller出现空指针异常问题,但是运行主函数可正常注入。
@Autowired
@Resouce
@Controller
@Service
@RequestMapper(...)
使用Junit测试Controller类时出现了service与controller出现空指针异常问题,但是运行主函数可正常注入。
@Autowired
@Resouce
@Controller
@Service
@RequestMapper(...)