spring 需要在类上加载spring配置
如下
@RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations="classpath*:spring/spring-applicationContext.xml") @Transactional @Rollback(value=false)
springboot简化了很多
@RunWith(SpringRunner.class) @SpringBootTest