- Java code
package com.hollycrm.hollyv8.zsptest.zsp.service.impl;import ...public class UserManagerServiceImpl implements UserManagerService { private UserManagerDao userDao; public void setUserManagerDao(UserManagerDao userDao){ this.userDao = userDao ; } public UserManagerDao getUserManagerDao(){ return this.userDao ; } public void addUser(UserInfo user) { this.userDao.add(user) ; } public void deleteUser(String account) { // TODO Auto-generated method stub this.userDao.delete(account) ; } public UserInfo getUser(String account) { // TODO Auto-generated method stub return this.userDao.getUserInfo(account); } public UserInfo getUser(String name, String account) { // TODO Auto-generated method stub List<UserInfo> list = this.userDao.getUserInfo(name, account); if(list != null&&list.size() > 0){ return list.get(0); }else{ return null; } } public List<UserInfo> listUser() { // TODO Auto-generated method stub return this.userDao.getUserInfos(); } public void saveOrUpdate(UserInfo user) { // TODO Auto-generated method stub this.userDao.saveOrUpdate(user); } public UserInfo query(){ return this.userDao.query(); } }
- Java code
com.hollycrm.hollyv8.zsptest.zsp.service.impl.UserManagerServiceImpl cannot be cast to java.util.Collection
大家帮我看看这是怎么回事?
------解决方案--------------------------------------------------------