如何使用STS将Spring Collections与Spring Boot一起使用?

时间:2015-08-21 10:35:22

标签: collections spring-boot spring-tool-suite

我想使用Spring Boot在Spring MVC中实现Spring Collections。

如何在Spring Boot 1.2.5中使用以下Spring Collection

appConfig.xml

<bean id="appConfig" class="com.xyz.common.AppConfig">
    <!-- java.util.List -->
    <property name="lists">
        <list>
        </list>
    </property>
    <!-- java.util.Set -->
    <property name="sets">
        <set>
        </set>
    </property>
    <!-- java.util.Map -->
    <property name="maps">
        <map>
        </map>
    </property>
    <!-- java.util.Properties -->
    <property name="pros">
        <props>
        </props>
    </property>
</bean>
</beans>

AppConfig.java

public class AppConfig 
{
    private List<Object> lists;
    private Set<Object> sets;
    private Map<Object, Object> maps;
    private Properties pros;

    //...

    getter 
    setter
}

0 个答案:

没有答案
相关问题