MyFreeMarkerConfigurer

public class MyFreeMarkerConfigurer extends FreeMarkerConfigurer {
    @Override
    public void afterPropertiesSet() throws IOException, TemplateException {
        super.afterPropertiesSet();
        Configuration cf = this.getConfiguration();
        cf.setSharedVariable("shiro",new ShiroTags());
    }
}

 

上一篇:Spring afterPropertiesSet方法


下一篇:Mybatis整合Spring之MapperFactoryBean简单分析