Java Code Examples for freemarker.template.TemplateModelException#printStackTrace()
The following examples show how to use
freemarker.template.TemplateModelException#printStackTrace() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FreemarkerSharedVariableMonitorAspects.java From OneBlog with GNU General Public License v3.0 | 6 votes |
@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(); } }
Example 2
Source File: StartedListener.java From SENS with GNU General Public License v3.0 | 5 votes |
@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!"); }
Example 3
Source File: StartedListener.java From stone with GNU General Public License v3.0 | 5 votes |
@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!"); }
Example 4
Source File: StartedListener.java From blog-sharon with Apache License 2.0 | 5 votes |
@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!"); }
Example 5
Source File: FreeMarkerConfig.java From OneBlog with GNU General Public License v3.0 | 5 votes |
/** * 添加自定义标签 */ @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(); } }