美文网首页
@AutoWired 出现空指针异常

@AutoWired 出现空指针异常

作者: lyoungzzz | 来源:发表于2019-12-10 15:17 被阅读0次

添加以下设置:
@WebAppConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "file:src/main/webapp/WEB-INF/spring/root-context.xml",
"file:src/main/webapp/WEB-INF/spring/appServlet/controllers.xml",
"file:src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml" })

相关文章

网友评论

      本文标题:@AutoWired 出现空指针异常

      本文链接:https://www.haomeiwen.com/subject/kvdggctx.html