freemarker.template.TemplateModelException#printStackTrace ( )源码实例Demo

下面列出了freemarker.template.TemplateModelException#printStackTrace ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

@After("pointcut()")
public void after(JoinPoint joinPoint) {
    Map config = configService.getConfigs();
    if (null == config) {
        log.error("config为空");
        return;
    }
    Long updateTime = ((Date) config.get(ConfigKeyEnum.UPDATE_TIME.getKey())).getTime();
    if (updateTime == configLastUpdateTime) {
        log.debug("config表未更新");
        return;
    }
    log.debug("config表已更新,重新加载config到shared variable");
    configLastUpdateTime = updateTime;
    try {
        configuration.setSharedVariable("config", config);
    } catch (TemplateModelException e) {
        e.printStackTrace();
    }
}
 
源代码2 项目: SENS   文件: StartedListener.java
@Override
    public void onApplicationEvent(ApplicationStartedEvent event) {
        try {
            this.loadActiveTheme();
        } catch (TemplateModelException e) {
            e.printStackTrace();
        }
        this.loadOptions();
        this.loadOwo();
        //启动定时任务
//        CronUtil.start();
        log.info("The scheduled task starts successfully!");
    }
 
源代码3 项目: stone   文件: StartedListener.java
@Override
public void onApplicationEvent(ApplicationStartedEvent event) {
    try {
        this.loadActiveTheme();
    } catch (TemplateModelException e) {
        e.printStackTrace();
    }
    this.loadOptions();
    this.loadThemes();
    this.loadOwo();
    //启动定时任务
    CronUtil.start();
    log.info("The scheduled task starts successfully!");
}
 
源代码4 项目: blog-sharon   文件: StartedListener.java
@Override
public void onApplicationEvent(ApplicationStartedEvent event) {
    try {
        this.loadActiveTheme();
    } catch (TemplateModelException e) {
        e.printStackTrace();
    }
    this.loadOptions();
    this.loadThemes();
    this.loadOwo();
    //启动定时任务
    CronUtil.start();
    log.info("The scheduled task starts successfully!");
}
 
源代码5 项目: OneBlog   文件: FreeMarkerConfig.java
/**
 * 添加自定义标签
 */
@PostConstruct
public void setSharedVariable() {
    configuration.setSharedVariable("zhydTag", customTags);
    configuration.setSharedVariable("articleTag", articleTags);
    try {
        configuration.setSharedVariable("config", configService.getConfigs());
        //shiro标签
        configuration.setSharedVariable("shiro", new ShiroTags());
    } catch (TemplateModelException e) {
        e.printStackTrace();
    }
}