异常分析

    编写程序不要以太长为主。异常分析以提示来进行查找确认。

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-config-mybatis.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'org.springframework.core.io.Resource[]' for property 'mapperLocations'; nested exception is java.lang.IllegalArgumentException: Could not resolve resource location pattern [classpath:sql/*.xml]: class path resource [sql/] cannot be resolved to URL because it does not exist

    根据提示去看部署路径下是否有sql文件夹,sql文件夹下是否有文件

    idea maven编译web项目后需要package后去tomcat部署以避免有资源问题未拷贝导致的异常。

原文地址:https://www.cnblogs.com/freedommovie/p/5756090.html