title: Play Framework + Spring: Injecting URL from application.conf
body: <p>I'm using Spring 4.1.x with Play 2.3.x and I'm trying to inject a property value from Play's <code>application.conf</code> file.</p>
  
  <p>I can access properties thanks to this:</p>
  
  <p><code>@PropertySource("classpath:application.conf")</code></p>
  
  <pre><code>@Bean
  public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
      return new PropertySourcesPlaceholderConfigurer();
  }
  </code></pre>
  
  <p>I have a URL value in my <code>application.conf</code>:</p>
  
  <p><code>photo.url="https://our-photo-storage.net"</code></p>
  
  <p>Note the <strong>quotes</strong>. If I remove them, Play will throw <code>com.typesafe.config.ConfigException$Parse</code>. </p>
  
  <p>I am injecting property value like this:</p>
  
  <pre><code>@Autowired
  public PhotoToUrlMapper(@Value("${photo.url}") url) {
      // trim quotes :-/
  }
  </code></pre>
  
  <p>Spring will inject the value <strong>with the quotes</strong>. I can obviously just trim them, but I'd like to be able to inject the url without the quotes.</p>
  
  <p>Notes:</p>
  
  <ul>
  <li>I could probably create a separate <code>.properties</code> file, but I'd like to avoid that (more configuration)</li>
  <li>I could probably use horrible static Play's <code>Play.current.configuration.getString("photo.url")</code>, but I actually like to write unit tests ...</li>
  </ul>
  
  <p>Is there a reasonable workaround for this?</p>