spring list-map类型注入(Spring list map type injection)

<bean id="test" class="com.example.demo01.domain.Test"><!--注入list-->    <property name="list">        <list>            <value>spring</value>            <value>spring boot</value>            <value>spring could</value>        </list>    </property><!--注入map-->    <property name="map">        <map>            <entry key="1" value="SpringCould 课程"></entry>            <entry key="2" value="SpringSecurity 课程"></entry>            <entry key="3" value="模拟微信支付 课程"></entry>        </map>    </property></bean>Test类
public class Test implements Serializable {    private List<String> list;    private Map<Integer,String> map;    public Test(){    }    public Test(List<String> list, Map<Integer, String> map) {        this.list = list;        this.map = map;    }    public List<String> getList() {        return list;    }    public void setList(List<String> list) {        this.list = list;    }    public Map<Integer, String> getMap() {        return map;    }    public void setMap(Map<Integer, String> map) {        this.map = map;    }    @Override    public String toString() {        return "Test{" +                "list=" + list +                ", map=" + map +                '}';    }}
————————
<bean id="test" class="com.example.demo01.domain.Test"><!--注入list-->    <property name="list">        <list>            <value>spring</value>            <value>spring boot</value>            <value>spring could</value>        </list>    </property><!--注入map-->    <property name="map">        <map>            <entry key="1" value="SpringCould 课程"></entry>            <entry key="2" value="SpringSecurity 课程"></entry>            <entry key="3" value="模拟微信支付 课程"></entry>        </map>    </property></bean>Test类
public class Test implements Serializable {    private List<String> list;    private Map<Integer,String> map;    public Test(){    }    public Test(List<String> list, Map<Integer, String> map) {        this.list = list;        this.map = map;    }    public List<String> getList() {        return list;    }    public void setList(List<String> list) {        this.list = list;    }    public Map<Integer, String> getMap() {        return map;    }    public void setMap(Map<Integer, String> map) {        this.map = map;    }    @Override    public String toString() {        return "Test{" +                "list=" + list +                ", map=" + map +                '}';    }}