Junit 测试 Spring 老是报错,说什么找不到资源文件。
Error creating bean with name 'dataLoadDao' defined in file
[D:\yaku\JuTe\voke\src\application\applicationContext_Dao.xml]:
Cannot resolve reference to bean 'daoSupportPool' while setting bean property 'daoSupportPool';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'daoSupportPool' defined in file
[D:\yaku\JuTe\voke\src\application\applicationContext_Ibatis.xml]:
Cannot resolve reference to bean 'mcnsIbatisDaoSupport' while setting bean property 'mcnsIbatisDaoSupport';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'mcnsIbatisDaoSupport' defined in file
[D:\yaku\JuTe\voke\src\application\applicationContext_Ibatis.xml]:
Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'sqlMapClient' defined in file
[D:\yaku\JuTe\voke\src\application\applicationContext_Ibatis.xml]:
Invocation of init method failed; nested exception is java.lang.RuntimeException:
Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.
Cause: java.io.IOException: Could not find resource com/yaku/voke/sql/service/seq_sqlmap.xml
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'dataLoadDao' defined in file
[D:\yaku\JuTe\voke\src\application\applicationContext_Dao.xml]:
Cannot resolve reference to bean 'daoSupportPool' while setting bean property 'daoSupportPool';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'daoSupportPool' defined in file
[D:\yaku\JuTe\voke\src\application\applicationContext_Ibatis.xml]:
Cannot resolve reference to bean 'mcnsIbatisDaoSupport' while setting bean property 'mcnsIbatisDaoSupport';
路径没问题,在Eclipse中可以运行。但是放在别的环境下就报上面的错。Junit找不到?