admin管理员组

文章数量:1565813


当要诸如一个接口的实现类时:

  1. 使用接口来进行类对象转换_
    UserService bean = ac.getBean(“UserServiceImpl”,UserService.class); // UserServiceImpl bean = ac.getBean("UserServiceImpl",UserServiceImpl.class);
  2. 多个不同的实现,根据添加name属性来查找

`
public interface UserService{

}

@Service(“UserServiceImpl”)
public class UserServiceImpl implements UserService{

}

@AutoWired
@Quatifirer(“UserServiceImpl”)
UserService UserServiceImpl;
`

本文标签: xxexpectedbeannamedproxy