刚在学spring,spring2.0之后的版本还好说但就是不知道spring2.0怎么引入properties文件

解决方案 »

  1.   

    这个不是spring的东西,java1.5就有了。
      

  2.   


    <!-- 定义数据源配置文件 -->
          <bean id="propertyConfigurer"
    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
    lazy-init="false">
    <property name="locations">
    <list>
    <value>classpath*:messageResource.properties</value>
    </list>
    </property>
     </bean>