All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.zhyshko.core.configuration.MessageSourceConfiguration Maven / Gradle / Ivy

The newest version!
package io.github.zhyshko.core.configuration;

import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.stereotype.Component;

@Component
public class MessageSourceConfiguration {

    @Bean
    public MessageSource messageSource() {
        ReloadableResourceBundleMessageSource messageSource
                = new ReloadableResourceBundleMessageSource();

        messageSource.setBasename("classpath:messages");
        messageSource.setDefaultEncoding("UTF-8");
        return messageSource;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy