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屬性來查找 `
相關文章
相關標籤/搜索