ResourceBundleMessageSource Error
<p>Configuration file:</p>

<pre><code>@Configuration
@ComponentScan("com.test.spring")
public class SpringConfiguration {

    @Bean("msg")
    public MessageSource messageSource() {
        ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
        messageSource.setBasename("classpath:locales/locales");
        messageSource.setDefaultEncoding("UTF-8");
        return messageSource;
    }
}
</code></pre>

<p>File locales.properties locate in src/main/resources/locales
But when I call in xhtml:</p>

<pre><code>  ${msg.Welcome}
</code></pre>

<p>And start page, return error: </p>

<pre><code>/index.xhtml: The class 'org.springframework.context.support.ResourceBundleMessageSource' does not have the property 'Welcome'.
</code></pre>