title: SpEL @ConditionalOnProperty string property empty or nulll
body: <p>I am currently having trouble with my dataSource bean creation on condition of String property from my applications.yaml file.</p>
  
  <p>Ideally, I would only like to create the dataSource bean only if the url is set in my application.yaml file. Shouldn't create the bean if its not present (empty or null). I know this condition checks on boolean but is there anyway to check if the string property is empty or null?</p>
  
  <p>DatabaseConfig.java</p>
  
  <pre><code>@Configuration
  public class DatabaseConfig {
      @Value("${database.url:}")
      private String databaseUrl;
  
      @Value("${database.username:}")
      private String databaseUsername;
  
      @Value("${database.password:}")
      private String databasePassword;
  
      protected static final String DRIVER_CLASS_NAME = "com.sybase.jdbc4.jdbc.SybDriver";
  
  
      /**
       * Configures and returns a datasource. Optional
       *
       * @return A datasource.
       */
      @ConditionalOnProperty(value = "database.url")
      @Bean
      public DataSource dataSource() {
          return DataSourceBuilder.create()
              .url(testDatabaseUrl)
              .username(testDatabaseUsername)
              .password(testDatabasePassword)
              .build();
      }
  }
  </code></pre>
  
  <p>application.yml (This field will be optional)</p>
  
  <pre><code>database:
    url: http://localhost:9000
  </code></pre>