首页 > 编程语言 > 详细

Spring 自定义配置类bean

时间:2017-03-30 00:24:52      阅读:306      评论:0      收藏:0      [点我收藏+]
 <!-- 引入配置文件 -->
    <bean id="propertyConfigurer"  
        class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">  
        <property name="locations">
            <list>
                <value>classpath:resources/jdbc.properties</value>  <!--jdbc的配置文件-->
                <value>classpath:resources/QRCodeProperties.properties</value>  <!--自定义的配置文件-->
            </list>
        </property>  
    </bean> 
    
    <!-- 自定义配置类bean --> 
       <bean id="woaConfigure" class="com.ink.utils.WOAProperties">
           <property name="QRCodeDictory" value="${QRCodeDictory}" /> 
           <property name="QRCodeHeight" value="${QRCodeHeight}" />
           <property name="QRCodePicFormat" value="${QRCodePicFormat}" />
           <property name="QRCodePrefix"  value="${QRCodePrefix}"/>
           <property name="QRCodeWidth" value="${QRCodeWidth}" />
           <property name="QRCodeTempDictory" value="${QRCodeTempDictory}" />
       </bean>

 

Spring 自定义配置类bean

原文:http://www.cnblogs.com/inkflower/p/6642297.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!