Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring <prop> tag

Tags:

spring

I have

   <bean id="dao" class="......"> 
      <property name="foo">
         <props>
           <prop key="me">Homer</prop>
         <props>
       <property>
   </bean>

I want to use my current properties file, name-value pair, to change "Homer" I cannot figure it out...

like image 445
bmw0128 Avatar asked Dec 01 '08 23:12

bmw0128


1 Answers

Use the PropertyPlaceholderConfigurer bean. Example here:

http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-factory-placeholderconfigurer

like image 104
cliff.meyers Avatar answered Nov 22 '22 00:11

cliff.meyers