添加支付接口控制器后,启动失败
来源:11-10 支付模块所有功能自测
慕粉2393263
2017-07-08
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
2回答
-
Geely
2017-07-09
hi 赞!引错jar包了这是。
10 -
慕粉2393263
提问者
2017-07-08
【已解决】自己查到出错处。从报错日志最后一个报错异常处,在service接口 IxxxService 里,List对象引用了一个sun包里的List类,改为引入java.util.List后可以正常跑起项目。。。【编写代码时候经常遇到idea首选自动补齐一些与项目不一致的引入声明,希望老师在后续课程中对这方面做些说明,要不然调错都不知道从哪里调】
10
相似问题