maven+spring测试出现 java.lang.IllegalStateException: Failed to load ApplicationContext异常

  1. java.lang.IllegalStateException: Failed to load ApplicationContext  

  1.     at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:99)  
整了快两个小时了,最后才知道没有将spring配置文件夹中的配置文件加载到classpath中,lz以前并不知道要这样做。
只用右击src.main.source选择build class  -> Use as a source Folder就解决问题了

猜你喜欢

转载自blog.csdn.net/fatii/article/details/59108785