title: Spring Beans - how to wire null as a constructor arg?
body: <p>I have the following bean defined:</p>
  
  <pre><code>&lt;bean id="myBean" class="com.me.myapp.Widget"&gt;
      &lt;constructor-arg name="fizz" value="null"/&gt;
      &lt;constructor-arg name="buzz" ref="someOtherBean" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>When I run my app, Spring throws a bean config exception:</p>
  
  <pre><code>[java] Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'myBean' defined in class path resource [spring-config.xml]:
  Unsatisfied dependency expressed through constructor argument with index 0
  of type [com.me.myapp.Widget]: Could not convert constructor argument value of
  type [java.lang.String] to required type [com.me.myapp.Widget]: Failed to
  convert value of type 'java.lang.String' to required type
  'com.me.myapp.Widget'; nested exception is java.lang.IllegalStateException:
  Cannot convert value of type [java.lang.String] to required
  type [com.me.myapp.Widget]: no matching editors or conversion strategy found
  </code></pre>
  
  <p>I just want to create a <code>Widget</code> like I would if I wrote the following Java:</p>
  
  <pre><code>Widget w = new Widget(null, someOtherBean);
  </code></pre>
  
  <p>How can I do this? Thanks in advance!</p>