JavaShuo
使用@Test测试spring报错
时间 2020-08-22
标签
使用
test
测试
spring
报错
使用@Test测试时,须要告诉junit spring的配置文件
不然在注入时,会发生空指针异常,缘由是junit根本找不到ioc容器,从而没法进行注入
web