Error creating bean with name 'categoryManageController': Injection of autowired dependencies failed;
到第九章测试为止,所有功能测试正常。跟着敲完第十章代码,启动报错提示,如下,但是未对原有的代码文件做任何修改。不知如何差错
另外希望老师介绍一些基本的spring报错差错流程,学习者改错就要基本上花费一半时间。
详细报错:
00:21:30.194][DEBUG][org.mybatis.spring.SqlSessionFactoryBean][RMI TCP Connection(2)-127.0.0.1] Parsed mapper file: 'file [/Users/blackbaka/IdeaProjects/mmall/target/mmall/WEB-INF/classes/mappers/CartMapper.xml]'
[00:21:30.225][DEBUG][org.mybatis.spring.SqlSessionFactoryBean][RMI TCP Connection(2)-127.0.0.1] Parsed mapper file: 'file [/Users/blackbaka/IdeaProjects/mmall/target/mmall/WEB-INF/classes/mappers/CategoryMapper.xml]'
七月 08, 2017 12:21:30 上午 org.springframework.web.context.ContextLoader initWebApplicationContext
严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'categoryManageController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mmall.service.IUserService com.mmall.controller.backend.CategoryManageController.iUserService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iUserService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mmall.dao.UserMapper com.mmall.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [/Users/blackbaka/IdeaProjects/mmall/target/mmall/WEB-INF/classes/com/mmall/dao/UserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/sun/tools/javac/util/List; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/sun/tools/javac/util/List