title: Conditionally create a Bean given a situation where the String is null
body: <p>How can I conditionally create a Bean given a situation where the String is null?</p>
  
  <p>The following example would cause an error, but I would like to somehow prevent it from happening by only creating beans when the string being assessed is not empty.</p>
  
  <pre><code>public class MyAppContext
  
    @Value("${this.string.is.null}")
    private String nullString;
  
    @SupressWarnings("SpringJavaAutowiringInspection")
    @Bean
    public MessageListenerContainer myQueue() {
      bean.setDestinationName(nullString)
    }
  </code></pre>