本文整理匯總了Java中org.thymeleaf.templateresolver.TemplateResolver.initialize方法的典型用法代碼示例。如果您正苦於以下問題:Java TemplateResolver.initialize方法的具體用法?Java TemplateResolver.initialize怎麽用?Java TemplateResolver.initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.thymeleaf.templateresolver.TemplateResolver
的用法示例。
在下文中一共展示了TemplateResolver.initialize方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: cachingCanBeDisabled
import org.thymeleaf.templateresolver.TemplateResolver; //導入方法依賴的package包/類
@Test
public void cachingCanBeDisabled() {
this.context.register(ThymeleafAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class);
EnvironmentTestUtils.addEnvironment(this.context, "spring.thymeleaf.cache:false");
this.context.refresh();
assertThat(this.context.getBean(ThymeleafViewResolver.class).isCache()).isFalse();
TemplateResolver templateResolver = this.context.getBean(TemplateResolver.class);
templateResolver.initialize();
assertThat(templateResolver.isCacheable()).isFalse();
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:12,代碼來源:ThymeleafAutoConfigurationTests.java
示例2: thymeleafCacheIsFalse
import org.thymeleaf.templateresolver.TemplateResolver; //導入方法依賴的package包/類
@Test
public void thymeleafCacheIsFalse() throws Exception {
this.context = initializeAndRun(Config.class);
TemplateResolver resolver = this.context.getBean(TemplateResolver.class);
resolver.initialize();
assertThat(resolver.isCacheable()).isFalse();
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:8,代碼來源:LocalDevToolsAutoConfigurationTests.java
示例3: defaultPropertyCanBeOverriddenFromCommandLine
import org.thymeleaf.templateresolver.TemplateResolver; //導入方法依賴的package包/類
@Test
public void defaultPropertyCanBeOverriddenFromCommandLine() throws Exception {
this.context = initializeAndRun(Config.class, "--spring.thymeleaf.cache=true");
TemplateResolver resolver = this.context.getBean(TemplateResolver.class);
resolver.initialize();
assertThat(resolver.isCacheable()).isTrue();
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:8,代碼來源:LocalDevToolsAutoConfigurationTests.java
示例4: defaultPropertyCanBeOverriddenFromUserHomeProperties
import org.thymeleaf.templateresolver.TemplateResolver; //導入方法依賴的package包/類
@Test
public void defaultPropertyCanBeOverriddenFromUserHomeProperties() throws Exception {
String userHome = System.getProperty("user.home");
System.setProperty("user.home",
new File("src/test/resources/user-home").getAbsolutePath());
try {
this.context = initializeAndRun(Config.class);
TemplateResolver resolver = this.context.getBean(TemplateResolver.class);
resolver.initialize();
assertThat(resolver.isCacheable()).isTrue();
}
finally {
System.setProperty("user.home", userHome);
}
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:16,代碼來源:LocalDevToolsAutoConfigurationTests.java
示例5: thymeleafCacheIsFalse
import org.thymeleaf.templateresolver.TemplateResolver; //導入方法依賴的package包/類
@Test
public void thymeleafCacheIsFalse() throws Exception {
this.context = initializeAndRun(Config.class);
TemplateResolver resolver = this.context.getBean(TemplateResolver.class);
resolver.initialize();
assertThat(resolver.isCacheable(), equalTo(false));
}
示例6: defaultPropertyCanBeOverridenFromCommandLine
import org.thymeleaf.templateresolver.TemplateResolver; //導入方法依賴的package包/類
@Test
public void defaultPropertyCanBeOverridenFromCommandLine() throws Exception {
this.context = initializeAndRun(Config.class, "--spring.thymeleaf.cache=true");
TemplateResolver resolver = this.context.getBean(TemplateResolver.class);
resolver.initialize();
assertThat(resolver.isCacheable(), equalTo(true));
}
示例7: defaultPropertyCanBeOverridenFromUserHomeProperties
import org.thymeleaf.templateresolver.TemplateResolver; //導入方法依賴的package包/類
@Test
public void defaultPropertyCanBeOverridenFromUserHomeProperties() throws Exception {
String userHome = System.getProperty("user.home");
System.setProperty("user.home",
new File("src/test/resources/user-home").getAbsolutePath());
try {
this.context = initializeAndRun(Config.class);
TemplateResolver resolver = this.context.getBean(TemplateResolver.class);
resolver.initialize();
assertThat(resolver.isCacheable(), equalTo(true));
}
finally {
System.setProperty("user.home", userHome);
}
}