課程
/后端開發
/Java
/Spring入門篇
是不是版本問題,目前Autowired注解已經不支持Map和List的裝配了
2021-05-22
源自:Spring入門篇 4-3
正在回答
看 Spring - Autowired 的文檔,從 2.5 版本開始就一直支持 Autowiring Arrays, Collections, and Maps。
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/annotation/Autowired.html
不知道你用的哪個版本,但 2.5 以后應該都支持。
舉報
為您帶來IOC和AOP的基本概念及用法,為后續高級課程學習打下基礎
1 回答spring什么版本的呀
3 回答這個是spring哪個版本的?3.x的嗎
1 回答spring包問題
1 回答配置Spring的問題
8 回答spring aop 配置問題
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2023-03-06
看 Spring - Autowired 的文檔,從 2.5 版本開始就一直支持 Autowiring Arrays, Collections, and Maps。
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/annotation/Autowired.html
不知道你用的哪個版本,但 2.5 以后應該都支持。