spring单元测试报错:Failed to load ApplicationContext 的解决方法 使用idea 配置单元测试之后,配置完spring的注解@junit 和@runer 之后 一直报错。 最后发现是默认使用jdk1.8引起的,使用jdk1.7即可。