请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

2-7 验证dao

图片描述
十一月 06, 2018 9:00:32 上午 org.springframework.context.support.GenericApplicationContext refresh
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [spring/spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias ‘com.lhl.oto.dao.split.DynamicDataSourceInterceptor’. Cause: java.lang.ClassNotFoundException: Cannot find class: com.lhl.oto.dao.split.DynamicDataSourceInterceptor
十一月 06, 2018 9:00:32 上午 org.springframework.test.context.TestContextManager prepareTestInstance
严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@617c74e5] to prepare test instance [com.lhl.oto.dao.AreaDaoTest@1ffaf86]

报错了

正在回答

1回答

同学好,建议你在没有解决问题的能力之前不要直接复制粘贴,用后面最终源码的配置,因为那时候已经有了动态数据库适配,数据库加密等配置,建议你跟着视频去学习,不然还会遇到各种各样的错误

0 回复 有任何疑惑可以回复我~
  • 提问者 慕勒0596610 #1
    是跟着视频学习的
    回复 有任何疑惑可以回复我~ 2018-11-07 00:34:17
  • 提问者 慕勒0596610 #2
    昨天按你说的将jar全部清空,然后update maven project,运行就报这个错
    回复 有任何疑惑可以回复我~ 2018-11-07 00:36:46
  • 提问者 慕勒0596610 #3
    老师能说说具体报错原因吗,我看了spring/spring-dao.xml 下的sqlSessionFactory 配置好像没问题
    回复 有任何疑惑可以回复我~ 2018-11-07 00:43:07
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号