title: How to read value from bean in applicationContext.xml?
body: <p>I need to set a parameter value interface IP address in my applicationContext.xml</p>
  
  <p>I read this setting from properties file and I use it this manner:</p>
  
  <pre><code>&lt;bean id="hazelcastInterface" class="com.hazelcast.config.InterfacesConfig"&gt;
          &lt;property name="interfaces"&gt;
              &lt;list&gt;
                  &lt;value&gt;${interface.ip_address}&lt;/value&gt;
              &lt;/list&gt;
          &lt;/property&gt;
          &lt;property name="enabled" value="true" /&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>Now I need to get this value from a command line parameter. I use Apache Commons CLI parser, parse parameters and create my own bean commandLineConf from it and set it into ApplicationContext.</p>
  
  <pre><code>ExternalBeanReferneceFactoryBean.setInstance("commandLineConf", conf);
  beanFactory.registerBeanDefinition(
      "commandLineConf",
      BeanDefinitionBuilder.rootBeanDefinition(
          ExternalBeanReferneceFactoryBean.class)
          .getBeanDefinition());
  
  GenericApplicationContext rootAppContext = new GenericApplicationContext(
      beanFactory);
  rootAppContext.refresh();
  </code></pre>
  
  <p>But I don't know how to get value from this bean in applicationContext.xml. I have tried many way, e.g. but it doesn't work for me. </p>
  
  <pre><code>&lt;bean id="hazelcastInterface" class="com.hazelcast.config.InterfacesConfig"&gt;
          &lt;property name="interfaces"&gt;
              &lt;list&gt;
                  &lt;value&gt;#{commandLineConf.ipAddress}&lt;/value&gt;
              &lt;/list&gt;
          &lt;/property&gt;
          &lt;property name="enabled" value="true" /&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>