在程序员生涯当中,提到最多的应该就是SSH三大框架了。作为第一大框架的Spring框架,我们经常使用。
然而在使用过程中,遇到过很多的常见异常,我在这里总结一下,大家共勉。
一、找不到配置文件的异常
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [com/herman/ss/controller]; nested exception is java.io.FileNotFoundException: class path resource [com/herman/ss/controller] cannot be opened because it does not exist解释:这个的意思是说,没有找配置文件为controller的xml,修改一下配置文件名字即可。
<init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:com/herman/ss/config/testAjax.xml</param-value> </init-param>二、在xml中配置的命名空间找不到对应的Schema的异常
nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'util:list'. xmlns:util="http://ponent-scan>包下面用*匹配总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对的支持。如果你想了解更多相关内容请查看下面相关链接