SSM框架搭建后,运行出错,上图

[ERROR] Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@1b1ee57f{/,E:\ssm\src\main\webapp}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mainController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.wangjianxin.test.manager.StudentManager com.wangjianxin.test.controller.MainController.studentManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentManagerImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.wangjianxin.test.dao.StudentDao com.wangjianxin.test.manager.impl.StudentManagerImpl.studentDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.wangjianxin.test.dao.StudentDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentDao' defined in file [E:\ssm\target\classes\com\wangjianxin\test\dao\StudentDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-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:com/wangjianxin/test/mapping/*.xml]: class path resource [com/wangjianxin/test/mapping/] cannot be resolved to URL because it does not exist
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentDao' defined in file [E:\ssm\target\classes\com\wangjianxin\test\dao\StudentDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-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:com/wangjianxin/test/mapping/*.xml]: class path resource [com/wangjianxin/test/mapping/] cannot be resolved to URL because it does not exist
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:292)

图片说明

Could not autowire field: private com.wangjianxin.test.manager.StudentManager com.wangjianxin.test.controller.MainController.studentManager; 这句话是关键,看一下配置文件是否哪里有错

图片说明 mybatis配置的这个路径不存在,建一下这个包路径