增加注解@WebAppConfiguration,执行在web环境运行;
@ActiveProfiles("test")
@WebAppConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"classpath*:/spring/*.xml"})
增加注解@WebAppConfiguration,执行在web环境运行;
@ActiveProfiles("test")
@WebAppConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"classpath*:/spring/*.xml"})