注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

北漂的小羊

Java编程,开发者,程序员,软件开发,编程,代码。新浪微博号:IT国子监

 
 
 

日志

 
 
关于我

在这里是面向程序员的高品质IT技术学习社区,是程序员学习成长的地方。让我们更好地用技术改变世界。请关注新浪微博号: IT国子监(http://weibo.com/itguozijian)

网易考拉推荐

异常Unsatisfied dependency expressed through bean property 'dataSource': Set this property value or disable dependency checking for this bean解决方案  

2012-12-14 13:28:51|  分类: spring |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
一、异常信息

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.taobao.www.fanjf.test.UserDaoTest':
Unsatisfied dependency expressed through bean property 'dataSource': Set this property value or disable dependency checking for this bean.  
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.checkDependencies(AbstractAutowireCapableBeanFactory.java:1184)  
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1006)  
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:329)  
at org.springframework.test.AbstractDependencyInjectionSpringContextTests.injectDependencies(AbstractDependencyInjectionSpringContextTests.java:205)  
at org.springframework.test.AbstractDependencyInjectionSpringContextTests.prepareTestInstance(AbstractDependencyInjectionSpringContextTests.java:180)  
at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:100)  
at junit.framework.TestCase.runBare(TestCase.java:132)  
at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)  
at junit.framework.TestResult$1.protect(TestResult.java:110)  
at junit.framework.TestResult.runProtected(TestResult.java:128)  
at junit.framework.TestResult.run(TestResult.java:113)  
at junit.framework.TestCase.run(TestCase.java:124)  
at junit.framework.TestSuite.runTest(TestSuite.java:243)  
at junit.framework.TestSuite.run(TestSuite.java:238)  
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)  
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)  
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)  
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)  
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)  
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)  
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


二、解决方案:

setDependencyCheck(false);

  评论这张
 
阅读(830)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016