I have a peculiar requirement of setting the value of some bean from system environment variable , is this thing possible in spring ?
Pseudo code
<bean id="connectionFactory"
    class="org.springframework.amqp.rabbit.connection.CachingConnectionFactory">
        <constructor-arg value="testhost" />
        <property name="username" value="$SystemEnv.RabbitUserName" />
        <property name="password" value="$SystemEnv.RabbitPassword" />
    </bean>
Now these RabbitUserName and RabbitPassword are externalized in some environmental variable which is outside .war file .
Is there any elegant way to achieve the same in spring ?
 
     
    