在用junit测试dao接口时,出现以下的错误
Caused by: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'userDao' must be of type [com.changetech.dao.impl.UserDaoImpl], but was actually of type [$Proxy16]
最后经过仔细检查,错误原因如下:
@Resource(name="userDao")
protected UserDaoImpl userDao;
public void setUserDao(UserDaoImpl userDao) {
this.userDao = userDao;
}
原来在定义Dao时,没有用接口,而直接使用的是Dao的实现类,改为如下:
@Resource(name="userDao")
protected IUserDao userDao;
public void setUserDao(IUserDao userDao) {
this.userDao = userDao;
}
问题得到了解决
分享到:
相关推荐
Named Pipe TCP Proxy 终端控制台与模拟器连接: 串口重定向工具,在vmware ORACLE VirtualBox等模拟器下使用。 作为虚拟机之间的管理桥梁,很多时候还能非常有帮助的。
named pipe tcp proxy
Named Pipe TCP Proxy 终端控制台与模拟器连接,串口重定向工具,在vmware ORACLE VirtualBox等模拟器下使用 作为虚拟机之间的管理桥梁,很多时候还能非常有帮助的
Java动态代理内存中生成的$Proxy0类
会把输入输出重定向到com口,也就是serial上
主要介绍了java.lang.NoSuchMethodException: com.sun.proxy.$Proxy58.list错误解决办法的相关资料,需要的朋友可以参考下
Tftp ProxyServer 代理服务器 源码 *=========================================================================== * * Project: tftp_proxy, a proxy for TFTP transfers through firewalls * File: tftp_...
Return a **proxy object** that delegates method calls to a **parent or sibling** class of type. 返回一个代理对象, 这个对象负责将方法调用分配给第一个参数的一个父类或者同辈的类去完成. parent or sibling...
We way we’re more of a fully proxy but what does that mean and is it important to the customer? The line of what is and isn’t a proxy are being blurred. We need to clarify these differences and ...
use Proxy\Proxy; $request = Request::createFromGlobals(); $proxy = new Proxy(); $proxy->getEventDispatcher()->addListener('request.before_send', function($event){ $event['request']->headers->...
* Different proxy types can be mixed in the same chain. * Proxy chain: user-defined list of proxies chained together. Usability : * Run any program through proxy server. * Access the Internet ...
Proxy.rarProxy.rarProxy.rarProxy.rarProxy.rarProxy.rar代理设计模式
FoxyProxy 是一款高级代理服务器管理工具,是 Firefox 火狐浏览器的代理插件,相比比 SwitchProxy、ProxyButton、QuickProxy、xyzproxy、ProxyTex 等扩展提供更多的功能。 FoxyProxy 通过使用通配符、正则表达式和...
Abstract—Based on demands in proxy pattern, this article proposes informatization solution of proxy pattern which includes enterprise management, proxy management, franchisee management and supply ...
The define *must* be made in the project options. It is not sufficient to #define it in the source. If you manage to compile with C++ Builder (any version), I would very much like to know about it...
apache Proxy Error apache Proxy Error apache Proxy Error apache Proxy Error
*/ contract Proxy { /** * @dev Tells the address of the implementation where every call will be delegated. * @return address of the implementation to which it will be delegated */ function ...
proxy源代码,linux下的ftp 代理的源代码,大家多多支持啊
Proxy Server functionality - RFC 1919.Actually FTP clients can connect to FTP servers directly and can transmit and receive files or data directly through direct sockets connections, but in some cases...