验证DAO的问题,完全按老师的代码配置的,总是验证不了,错误信息如下
来源:2-7 验证Dao

MushBooms
2018-11-15
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.imooc.o2o.util.EncryptPropertyPlaceholderConfigurer] for bean with name ‘com.imooc.o2o.util.EncryptPropertyPlaceholderConfigurer#0’ defined in class path resource [spring/spring-dao.xml]; nested exception is java.lang.ClassNotFoundException: com.imooc.o2o.util.EncryptPropertyPlaceholderConfigurer
2回答
-
翔仔
2019-04-10
mybatis-config.xml
<plugins> <plugin interceptor="com.imooc.o2o.dao.split.DynamicDataSourceInterceptor"> </plugin> </plugins>
这个需要去掉,但是后面还有类似配置文件加密的配置,这些都是前面章节没有的,还会遇到问题
00 -
翔仔
2018-11-16
同学好,我可以肯定同学不是按照视频来的,而是直接用了最终代码里面的内容,因为com.imooc.o2o.util.EncryptPropertyPlaceholderConfigurer是后续我们在做加密配置的时候用到的。建议同学在还没有解决类似问题能力的情况下不要直接用最终代码里面的配置,因为还缺少后续很多内容,包括加密 主从同步等,否则会遇到各种各样奇怪的没办法解决的问题
012019-04-09
相似问题