Spring boot で多言語化する(i18n)

Spring bootでは

https://ti-tomo-knowledge.hatenablog.com/entry/2018/06/16/225947

public class Application {

    /**
     * i18n用
     */
    @Bean
    public MessageSource messageSource() {
        ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();

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