Question: ```
@Configuration
@PropertySource("classpath:service.properties")
public class ApplicationConfig{
    @Value("PROPERTY_MYSQL_JNDI_NAME")
    private String jndiName;
}

```

this was working fine. But when I register

```
@Bean
public MessageSource messageSource() {
    ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
    messageSource.setBasenames("resources/authentication");
    messageSource.setDefaultEncoding("UTF-8");
    return messageSource;
}

```

bean in the ApplicationConfig class previous property loading not working. is there any thing i can do to test it

Answer: 
I was facing the same issue. In my case, I had missed adding the following bean:

```
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
    return new PropertySourcesPlaceholderConfigurer();
}

```

which made the property loading work correctly.
You messageSource is wrong it should be as below assuming your authentication.properties is in src/resources:

```
@Bean
public MessageSource messageSource() {
    ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
    messageSource.setBasenames("authentication");
    messageSource.setDefaultEncoding("UTF-8");
    return messageSource;
}

```

You can still use

```
@PropertySource("classpath:config.properties")

```

Assuming config.properties is in src/resources