手记

springset注入 学习笔记--马士兵

private Set<String> sets;
    private List<String> lists;
    private Map<String , String> maps;
  <bean name="userDAO" class="com.bjsxt.dao.impl.UserDAOImpl">
    <property name="sets">
        <set>
            <value>1</value>
            <value>2</value>
        </set>
    </property>
    <property name="lists">
        <list>
            <value>1</value>
            <value>2</value>
            <value>3</value>
        </list>
    </property>
    <property name="maps">
        <map>
            <entry key="1" value="1"></entry>
            <entry key="2" value="2"></entry>
            <entry key="3" value="3"></entry>
            <entry key="4" value="4"></entry>
        </map>
    </property>
  </bean>
1人推荐
随时随地看视频
慕课网APP