zoukankan      html  css  js  c++  java
  • Spring 注入枚举数组

     在spring的配置文件xml中

     示例:

    <!--注入枚举数組-->
    <bean id="writeMapNullValue" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
        <property name="staticField" value="com.alibaba.fastjson.serializer.SerializerFeature.WriteMapNullValue" />
    </bean>
    <bean id="WriteNullStringAsEmpty" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
        <property name="staticField" value="com.alibaba.fastjson.serializer.SerializerFeature.WriteNullStringAsEmpty" />
    </bean>
    <bean id="fastJsonConfig" class="com.alibaba.fastjson.support.config.FastJsonConfig">
        <property name="charset" value="utf-8" />
        <property name="serializerFeatures" >
            <array>
                <ref bean="writeMapNullValue"/>
                <ref bean="WriteNullStringAsEmpty"/>
            </array>
        </property>
    </bean>
  • 相关阅读:
    expandafter
    又回到了kde
    朗读软件
    tex bookmarks
    vim命令执行时间
    vim,tex的编译
    utorrent
    火狐的扩展
    linux 无线指示灯闪
    tex溢出报警
  • 原文地址:https://www.cnblogs.com/phpdragon/p/10276239.html
Copyright © 2011-2022 走看看