首先是启动服务器报的异常:
Failed to convert property value of type '$Proxy8 implementing com.shop.dao.IUserDao,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised' to required type 'com.shop.dao.impl.UserDaoImpl' for property 'userDao'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [$Proxy8 implementing com.shop.dao.IUserDao,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.shop.dao.impl.UserDaoImpl] for property 'userDao': no matching editors or conversion strategy found
这是我写的东西。 不知道哪里出错啦啊
错误提示是类型转换错误。
既然UserDaoImpl实现了IUserDao,那在UserAction里面的声明,应该是IUserDao userDao,这样才符合规范吧。
否则你要这个接口又有什么用呢?
具体原因我也没有找出来;感觉有点别扭的是 切入规则 中 execution( ) 指定范围 你用的访问修饰符修改为public 试试
我刚刚测试过了发现不是这个问题 哈哈不好意思