title: Inject Map from command line
body: <p>I'm fairly new to spring so excuse me if this is a dumb question. When I try to launch a program I get the following error . </p>
  
  <p><strong>java -jar target/rest-executor-1.0.jar rest.args={name:'nokia',id:'233'}</strong></p>
  
  <pre><code>Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restArgument': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'rest.args' in value "{rest.args}"
          at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:379)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1350)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:580)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)
          at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
  
  
  
  
      public class RESTArgument {
  
      @Value(Argument.SERVER_PORT)
      private int serverPort;
  
      @Value(Argument.SERVER_ADDRESS)
      private String serverAddress;
  
      @Value(Argument.APP_NAME)
      private String applicationName;
  
      @Value(Argument.RESOURCE_NAME)
      private String resourceName;
  
      @Value(Argument.REST_ARGS)
      private Map&lt;String,String&gt; restArgs;
  
      public RESTArgument() {
      }
  
      public int getServerPort() {
          return serverPort;
      }
  
      public String getServerAddress() {
          return serverAddress;
      }
  
      public String getApplicationName() {
          return applicationName;
      }
  
      public String getResourceName() {
          return resourceName;
      }
  
      public  Map&lt;String,String&gt; getRestArgs(){
          return restArgs;
      }
  }
  </code></pre>
  
  <p>How can I inject a map from command line in my application ? My application will be invoked at run time so I can not use properties file .</p>