本文整理匯總了Java中no.api.freemarker.java8.Java8ObjectWrapper類的典型用法代碼示例。如果您正苦於以下問題:Java Java8ObjectWrapper類的具體用法?Java Java8ObjectWrapper怎麽用?Java Java8ObjectWrapper使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Java8ObjectWrapper類屬於no.api.freemarker.java8包,在下文中一共展示了Java8ObjectWrapper類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: TemplateEngineFreemarker
import no.api.freemarker.java8.Java8ObjectWrapper; //導入依賴的package包/類
public TemplateEngineFreemarker() {
this.configuration.setClassForTemplateLoading(this.getClass(), Default.TEMPLATES_FOLDER.toString());
this.configuration.setDefaultEncoding(Charsets.UTF_8.name());
this.configuration.setOutputEncoding(Charsets.UTF_8.name());
this.configuration.setLocalizedLookup(false);
this.configuration.setNumberFormat(Default.NUMBER_FORMAT.toString());
this.configuration.setTemplateLoader(new TemplateEngineLoader(configuration.getTemplateLoader()));
this.configuration.setAPIBuiltinEnabled(true);
this.configuration.setObjectWrapper(new Java8ObjectWrapper(VERSION));
if (Application.inDevMode()) {
this.configuration.setTemplateUpdateDelayMilliseconds(ONE_SECOND_MS);
} else {
this.configuration.setTemplateUpdateDelayMilliseconds(Integer.MAX_VALUE);
this.configuration.setCacheStorage(new MruCacheStorage(STRONG_SIZE_LIMIT, Integer.MAX_VALUE));
}
}
示例2: DateTimeStepdefs
import no.api.freemarker.java8.Java8ObjectWrapper; //導入依賴的package包/類
public DateTimeStepdefs() {
this.configuration = new Configuration(VERSION_2_3_23);
this.configuration.setObjectWrapper(new Java8ObjectWrapper(VERSION_2_3_23));
}