title: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Multiple 'property' definitions
body: <p>I'm new to Spring and trying to get familiar with the concepts. My purpose is to create multiple instances of the below-mentioned class.</p>
  
  <p><strong>Item.java</strong></p>
  
  <pre><code>public class Item {
      private int itemID;
      private String itemName;
  
  
      public int getItemID() {
          return itemID;
      }
  
      public void setItemID(int itemID) {
          this.itemID = itemID;
      }
  
      public String getItemName() {
          return itemName;
      }
  
      public void setItemName(String itemName) {
          this.itemName = itemName;
      }
  
      @Override
      public String toString() {
          return itemName;
      }
  }
  </code></pre>
  
  <p>In the config.xml I'm trying to set the property values in a below-mentioned way.</p>
  
  <pre><code>    &lt;bean name="item" class="com.manasa.spring.springcore.task1.Item"&gt;
          &lt;property name="itemID"&gt;
              &lt;value&gt;1&lt;/value&gt;
          &lt;/property&gt;
          &lt;property name="itemName"&gt;
              &lt;value&gt;Sandisk Pendrive&lt;/value&gt;
          &lt;/property&gt;
          &lt;property name="itemID"&gt;
              &lt;value&gt;2&lt;/value&gt;
          &lt;/property&gt;
          &lt;property name="itemName"&gt;
              &lt;value&gt;Dell Keyboard&lt;/value&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;bean name="cart" class="com.manasa.spring.springcore.task1.ShoppingCart"
          p:id="1"&gt;
          &lt;property name="items"&gt;
              &lt;map&gt;
                  &lt;entry key-ref="item"&gt;
                      &lt;value&gt;2&lt;/value&gt;
                  &lt;/entry&gt;
  
                  &lt;entry key-ref="item"&gt;
                      &lt;value&gt;1&lt;/value&gt;
                  &lt;/entry&gt;
              &lt;/map&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>By doing so, I am facing this issue:</p>
  
  <pre><code>&gt; Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unexpected failure during bean definition parsing
  Offending resource: class path resource [com/manasa/spring/springcore/task1/mapconfig.xml]
  Bean 'item'; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Multiple 'property' definitions for property 'itemID'
  Offending resource: class path resource [com/manasa/spring/springcore/task1/mapconfig.xml]
  Bean 'item'
      -&gt; Property 'itemID'
      at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70)
      at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
      at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:308)
      at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement(BeanDefinitionParserDelegate.java:562)
  </code></pre>
  
  <p>Could anyone please suggest on how to achieve this?</p>