org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration Java Examples
The following examples show how to use
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration.
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: SpringBeanResolutionTest.java From ogham with Apache License 2.0 | 5 votes |
@Before public void setUp() { contextRunner = new ApplicationContextRunner() .withPropertyValues( "mail.smtp.host="+ServerSetupTest.SMTP.getBindAddress(), "mail.smtp.port="+ServerSetupTest.SMTP.getPort(), "ogham.sms.smpp.host=127.0.0.1", "ogham.sms.smpp.port="+smppServer.getPort(), "spring.freemarker.suffix=") .withConfiguration(of(TestConfig.class, ThymeleafAutoConfiguration.class, FreeMarkerAutoConfiguration.class, OghamSpringBoot2AutoConfiguration.class)); }
Example #2
Source File: OghamSpringBoot2ThymeleafAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void oghamWithThymeleafAutoConfigShouldUseSpringTemplateEngine() throws Exception { contextRunner = contextRunner.withConfiguration(of(ThymeleafAutoConfiguration.class, OghamSpringBoot2AutoConfiguration.class)); contextRunner.run((context) -> { MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .thymeleaf() .all() .engine(isA(SpringTemplateEngine.class)); }); }
Example #3
Source File: OghamSpringBoot2ThymeleafAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void useCustomThymeleafBean() throws Exception { contextRunner = contextRunner.withConfiguration(of(CustomThymeleafEngineConfig.class, ThymeleafAutoConfiguration.class, OghamSpringBoot2AutoConfiguration.class)); contextRunner.run((context) -> { MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .thymeleaf() .all() .engine(isA(CustomSpringTemplateEngine.class)); }); }
Example #4
Source File: OghamSpringBoot1ThymeleafAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void oghamWithThymeleafAutoConfigShouldUseSpringTemplateEngine() throws Exception { context.register(ThymeleafAutoConfiguration.class, OghamSpringBoot1AutoConfiguration.class); context.refresh(); MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .thymeleaf() .all() .engine(isA(SpringTemplateEngine.class)); }
Example #5
Source File: OghamSpringBoot1ThymeleafAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void useCustomThymeleafBean() throws Exception { context.register(CustomThymeleafEngineConfig.class, ThymeleafAutoConfiguration.class, OghamSpringBoot1AutoConfiguration.class); context.refresh(); MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .thymeleaf() .all() .engine(isA(CustomSpringTemplateEngine.class)); }
Example #6
Source File: SpringBeanResolutionTest.java From ogham with Apache License 2.0 | 5 votes |
@Before public void setUp() { context = new AnnotationConfigApplicationContext(); EnvironmentTestUtils.addEnvironment(context, "mail.smtp.host="+ServerSetupTest.SMTP.getBindAddress(), "mail.smtp.port="+ServerSetupTest.SMTP.getPort(), "ogham.sms.smpp.host=127.0.0.1", "ogham.sms.smpp.port="+smppServer.getPort(), "spring.freemarker.suffix="); context.register(TestConfig.class, ThymeleafAutoConfiguration.class, FreeMarkerAutoConfiguration.class, OghamSpringBoot1AutoConfiguration.class); context.refresh(); messagingService = context.getBean(MessagingService.class); }