MyFreeMarkerConfigurer

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

 

posted @ 2020-12-05 19:27  y海涛  阅读(226)  评论(0编辑  收藏  举报