📜  spring boot 发送邮件html模板——Java代码示例

📅  最后修改于: 2022-03-11 14:52:35.339000             🧑  作者: Mango

代码示例2
@Bean
    @Primary
    public FreeMarkerConfigurationFactoryBean getFreeMarkerConfiguration() throws IOException {
        FreeMarkerConfigurationFactoryBean bean = new FreeMarkerConfigurationFactoryBean();
        ClassTemplateLoader ctl = new ClassTemplateLoader(getClass(), "/templates");
        bean.setPostTemplateLoaders(ctl);
        return bean;
    }