添加以下设置:
@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" })
网友评论