Bean named 'xx' is expected to be of type 'xx' but was actually of type 'com.sun.proxy.$Proxy29'

当要诸如一个接口的实现类时: 使用接口来进行类对象转换_ UserService bean = ac.getBean(“UserServiceImpl”,UserService.class); // UserServiceImpl bean = ac.getBean("UserServiceImpl",UserServiceImpl.class); 多个不同的实现,根据添加name属性来查找 `
相关文章
相关标签/搜索