PropertyConfig.java

package esa.bscs.pds4.packager.config;

import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.ResourceBundleMessageSource;

@Configuration
@PropertySource("classpath:packager.properties")
public class PropertyConfig {

    @Bean
    public MessageSource messageSource() {
        
        final ResourceBundleMessageSource source = new ResourceBundleMessageSource();
        source.setBasenames("messagesPackager", "messagesValidate");
        
        return source;
    }
}