org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration Java Examples
The following examples show how to use
org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration.
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: StaticMethodAccessTest.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(FreeMarkerAutoConfiguration.class, OghamSpringBoot2AutoConfiguration.class)); }
Example #3
Source File: OghamSpringBoot2FreeMarkerAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void oghamWithFreemarkerAutoConfigWithoutWebContextShouldUseSpringFreemarkerConfiguration() throws Exception { contextRunner = contextRunner.withConfiguration(of(FreeMarkerAutoConfiguration.class, OghamSpringBoot2AutoConfiguration.class)); contextRunner.run((context) -> { MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .freemarker() .all() .configuration() .defaultEncoding(equalTo(StandardCharsets.UTF_16BE.name())); }); }
Example #4
Source File: OghamSpringBoot2FreeMarkerAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void oghamWithFreemarkerAutoConfigInWebContextShouldUseSpringFreemarkerConfiguration() throws Exception { contextRunner = contextRunner.withConfiguration(of(WebMvcAutoConfiguration.class, FreeMarkerAutoConfiguration.class, OghamSpringBoot2AutoConfiguration.class)); contextRunner.run((context) -> { MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .freemarker() .all() .configuration() .defaultEncoding(equalTo(StandardCharsets.UTF_16BE.name())); }); }
Example #5
Source File: OghamSpringBoot2FreeMarkerAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void oghamWithFreemarkerAutoConfigWithoutWebContextAndOghamPropertiesShouldUseSpringFreemarkerConfigurationAndOghamProperties() throws Exception { contextRunner = contextRunner.withConfiguration(of(FreeMarkerAutoConfiguration.class, OghamSpringBoot2AutoConfiguration.class)) .withPropertyValues("ogham.freemarker.default-encoding="+StandardCharsets.US_ASCII.name()); contextRunner.run((context) -> { MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .freemarker() .all() .configuration() .defaultEncoding(equalTo(StandardCharsets.US_ASCII.name())); }); }
Example #6
Source File: OghamSpringBoot2FreeMarkerAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void oghamWithFreemarkerAutoConfigInWebContextAndOghamPropertiesShouldUseSpringFreemarkerConfigurationAndOghamProperties() throws Exception { contextRunner = contextRunner.withConfiguration(of(WebMvcAutoConfiguration.class, FreeMarkerAutoConfiguration.class, OghamSpringBoot2AutoConfiguration.class)) .withPropertyValues("ogham.freemarker.default-encoding="+StandardCharsets.US_ASCII.name()); contextRunner.run((context) -> { MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .freemarker() .all() .configuration() .defaultEncoding(equalTo(StandardCharsets.US_ASCII.name())); }); }
Example #7
Source File: OghamSpringBoot1FreeMarkerAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void oghamWithFreemarkerAutoConfigWithoutWebContextShouldUseSpringFreemarkerConfiguration() throws Exception { context.register(FreeMarkerAutoConfiguration.class, OghamSpringBoot1AutoConfiguration.class); context.refresh(); MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .freemarker() .all() .configuration() .defaultEncoding(equalTo(StandardCharsets.UTF_16BE.name())); }
Example #8
Source File: OghamSpringBoot1FreeMarkerAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void oghamWithFreemarkerAutoConfigInWebContextShouldUseSpringFreemarkerConfiguration() throws Exception { context.register(WebMvcAutoConfiguration.class, FreeMarkerAutoConfiguration.class, OghamSpringBoot1AutoConfiguration.class); context.refresh(); MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .freemarker() .all() .configuration() .defaultEncoding(equalTo(StandardCharsets.UTF_16BE.name())); }
Example #9
Source File: OghamSpringBoot1FreeMarkerAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void oghamWithFreemarkerAutoConfigWithoutWebContextAndOghamPropertiesShouldUseSpringFreemarkerConfigurationAndOghamProperties() throws Exception { EnvironmentTestUtils.addEnvironment(context, "ogham.freemarker.default-encoding="+StandardCharsets.US_ASCII.name()); context.register(FreeMarkerAutoConfiguration.class, OghamSpringBoot1AutoConfiguration.class); context.refresh(); MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .freemarker() .all() .configuration() .defaultEncoding(equalTo(StandardCharsets.US_ASCII.name())); }
Example #10
Source File: OghamSpringBoot1FreeMarkerAutoConfigurationTests.java From ogham with Apache License 2.0 | 5 votes |
@Test public void oghamWithFreemarkerAutoConfigInWebContextAndOghamPropertiesShouldUseSpringFreemarkerConfigurationAndOghamProperties() throws Exception { EnvironmentTestUtils.addEnvironment(context, "ogham.freemarker.default-encoding="+StandardCharsets.US_ASCII.name()); context.register(WebMvcAutoConfiguration.class, FreeMarkerAutoConfiguration.class, OghamSpringBoot1AutoConfiguration.class); context.refresh(); MessagingService messagingService = context.getBean(MessagingService.class); checkEmail(messagingService); checkSms(messagingService); OghamInternalAssertions.assertThat(messagingService) .freemarker() .all() .configuration() .defaultEncoding(equalTo(StandardCharsets.US_ASCII.name())); }
Example #11
Source File: StaticMethodsAccessTest.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( FreeMarkerAutoConfiguration.class, OghamSpringBoot1AutoConfiguration.class); context.refresh(); messagingService = context.getBean(MessagingService.class); }
Example #12
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); }