title: ResourceBundle as PropertySource in spring
body: <p>The PropertySource <a href="http://docs.spring.io/spring/docs/3.1.x/javadoc-api/org/springframework/context/annotation/PropertySource.html" rel="nofollow">documentation</a> demonstrates the use of <code>@PropertySource</code> to inject property file key/value pairs into the spring context.</p>
  
  <p>I want to know if it is possible to do the same with resource bundles. For example:</p>
  
  <pre><code>@Configuration
  @PropertySource("classpath:configuration")
  public class FooBar {
      @Value("${my.key}")
      private String someValue;
  
      public void printMe(){
          System.out.println("my.key = " + someValue); 
      }
  }
  </code></pre>
  
  <p><em>configuration.properties</em></p>
  
  <pre><code>my.key=foo
  </code></pre>
  
  <p><em>configuration_en.properties</em></p>
  
  <pre><code>my.key=baz
  </code></pre>
  
  <p>the result of printMe on an instance of FooBar would print the string:</p>
  
  <pre><code>my.key = baz
  </code></pre>
  
  <p>If the <code>user.language</code> system property was set to <code>en</code></p>