diff --git a/settings.gradle b/settings.gradle index 04bbd35e00..2c0bce7d72 100644 --- a/settings.gradle +++ b/settings.gradle @@ -52,6 +52,7 @@ include "spring-boot-project:spring-boot-devtools" include "spring-boot-project:spring-boot-docker-compose" include "spring-boot-project:spring-boot-docs" include "spring-boot-project:spring-boot-flyway" +include "spring-boot-project:spring-boot-freemarker" include "spring-boot-project:spring-boot-groovy-templates" include "spring-boot-project:spring-boot-jackson" include "spring-boot-project:spring-boot-jdbc" diff --git a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle index 72d79cfc61..d7ab87df54 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle @@ -117,7 +117,6 @@ dependencies { } optional("org.elasticsearch.client:elasticsearch-rest-client") optional("org.elasticsearch.client:elasticsearch-rest-client-sniffer") - optional("org.freemarker:freemarker") optional("org.glassfish.jersey.containers:jersey-container-servlet-core") optional("org.glassfish.jersey.containers:jersey-container-servlet") optional("org.glassfish.jersey.core:jersey-server") @@ -218,6 +217,7 @@ dependencies { optional("org.thymeleaf.extras:thymeleaf-extras-springsecurity6") optional("redis.clients:jedis") + testImplementation(project(":spring-boot-project:spring-boot-freemarker")) testImplementation(project(":spring-boot-project:spring-boot-jetty")) testImplementation(project(":spring-boot-project:spring-boot-test")) testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json index fe29995842..f90557a158 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -759,42 +759,6 @@ "reason": "Reactive Elasticsearch client no longer uses WebClient." } }, - { - "name": "spring.freemarker.allow-request-override", - "description": "Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. Only supported with Spring MVC." - }, - { - "name": "spring.freemarker.allow-session-override", - "description": "Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. Only supported with Spring MVC." - }, - { - "name": "spring.freemarker.cache", - "description": "Whether to enable template caching. Only supported with Spring MVC." - }, - { - "name": "spring.freemarker.content-type", - "description": "Content-Type value. Only supported with Spring MVC." - }, - { - "name": "spring.freemarker.expose-request-attributes", - "description": "Whether all request attributes should be added to the model prior to merging with the template. Only supported with Spring MVC." - }, - { - "name": "spring.freemarker.expose-session-attributes", - "description": "Whether all HttpSession attributes should be added to the model prior to merging with the template. Only supported with Spring MVC." - }, - { - "name": "spring.freemarker.expose-spring-macro-helpers", - "description": "Whether to expose a RequestContext for use by Spring's macro library, under the name \"springMacroRequestContext\". Only supported with Spring MVC." - }, - { - "name": "spring.freemarker.prefix", - "defaultValue": "" - }, - { - "name": "spring.freemarker.suffix", - "defaultValue": ".ftlh" - }, { "name": "spring.graphql.schema.file-extensions", "defaultValue": ".graphqls,.gqls" diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories index dda0d42049..26478a4d66 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories @@ -18,7 +18,6 @@ org.springframework.boot.autoconfigure.r2dbc.NoConnectionFactoryBeanFailureAnaly # Template Availability Providers org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider=\ -org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider,\ org.springframework.boot.autoconfigure.mustache.MustacheTemplateAvailabilityProvider,\ org.springframework.boot.autoconfigure.thymeleaf.ThymeleafTemplateAvailabilityProvider,\ org.springframework.boot.autoconfigure.web.servlet.JspTemplateAvailabilityProvider diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 791c071589..6c5cd59dfa 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -36,7 +36,6 @@ org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchClientAutoConfiguration org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration org.springframework.boot.autoconfigure.elasticsearch.ReactiveElasticsearchClientAutoConfiguration -org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQueryByExampleAutoConfiguration org.springframework.boot.autoconfigure.graphql.data.GraphQlReactiveQuerydslAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java index d4d1d8549c..f95f02f734 100755 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java @@ -39,11 +39,11 @@ import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration; -import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration; import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration; import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration; +import org.springframework.boot.freemarker.autoconfigure.FreeMarkerAutoConfiguration; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.testsupport.classpath.resources.WithResource; import org.springframework.boot.tomcat.autoconfigure.servlet.TomcatServletWebServerAutoConfiguration; diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index a9f9da7bbc..8bcf533769 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1987,6 +1987,7 @@ bom { "spring-boot-devtools", "spring-boot-docker-compose", "spring-boot-flyway", + "spring-boot-freemarker", "spring-boot-groovy-templates", "spring-boot-jackson", "spring-boot-jarmode-tools", diff --git a/spring-boot-project/spring-boot-devtools/build.gradle b/spring-boot-project/spring-boot-devtools/build.gradle index 54517febd8..885072fd4f 100644 --- a/spring-boot-project/spring-boot-devtools/build.gradle +++ b/spring-boot-project/spring-boot-devtools/build.gradle @@ -50,6 +50,7 @@ dependencies { optional("org.springframework.data:spring-data-redis") optional("org.springframework.session:spring-session-core") + testImplementation(project(":spring-boot-project:spring-boot-freemarker")) testImplementation(project(":spring-boot-project:spring-boot-test")) testImplementation(project(":spring-boot-project:spring-boot-tomcat")) testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) @@ -68,7 +69,6 @@ dependencies { testImplementation("org.springframework:spring-websocket") testImplementation("org.springframework.hateoas:spring-hateoas") testImplementation("org.springframework.security:spring-security-test") - testImplementation("org.freemarker:freemarker") testRuntimeOnly("org.aspectj:aspectjweaver") testRuntimeOnly("org.yaml:snakeyaml") diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfigurationTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfigurationTests.java index 30ff37fba9..dbed3b5338 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfigurationTests.java @@ -33,7 +33,6 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; -import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration; import org.springframework.boot.autoconfigure.web.WebProperties; import org.springframework.boot.autoconfigure.web.WebProperties.Resources; import org.springframework.boot.devtools.classpath.ClassPathChangedEvent; @@ -43,6 +42,7 @@ import org.springframework.boot.devtools.restart.FailureHandler; import org.springframework.boot.devtools.restart.MockRestartInitializer; import org.springframework.boot.devtools.restart.MockRestarter; import org.springframework.boot.devtools.restart.Restarter; +import org.springframework.boot.freemarker.autoconfigure.FreeMarkerAutoConfiguration; import org.springframework.boot.tomcat.TomcatWebServer; import org.springframework.boot.tomcat.autoconfigure.servlet.TomcatServletWebServerAutoConfiguration; import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext; diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index 3ae750579d..cc2eb8dea9 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -67,6 +67,7 @@ dependencies { autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "autoConfigurationMetadata")) + autoConfiguration(project(path: ":spring-boot-project:spring-boot-freemarker", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-jackson", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-jdbc", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "autoConfigurationMetadata")) @@ -92,6 +93,7 @@ dependencies { configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-flyway", configuration: "configurationPropertiesMetadata")) + configurationProperties(project(path: ":spring-boot-project:spring-boot-freemarker", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-jackson", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-jdbc", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-jetty", configuration: "configurationPropertiesMetadata")) diff --git a/spring-boot-project/spring-boot-freemarker/build.gradle b/spring-boot-project/spring-boot-freemarker/build.gradle new file mode 100644 index 0000000000..0a98085581 --- /dev/null +++ b/spring-boot-project/spring-boot-freemarker/build.gradle @@ -0,0 +1,25 @@ +plugins { + id "java-library" + id "org.springframework.boot.auto-configuration" + id "org.springframework.boot.configuration-properties" + id "org.springframework.boot.deployed" + id "org.springframework.boot.optional-dependencies" +} + +description = "Spring Boot Freemarker" + +dependencies { + api(project(":spring-boot-project:spring-boot")) + api("org.freemarker:freemarker") + api("org.springframework:spring-context-support") + + optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional("org.springframework:spring-webmvc") + optional("org.springframework:spring-webflux") + optional("jakarta.servlet:jakarta.servlet-api") + + testImplementation(project(":spring-boot-project:spring-boot-test")) + testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) + + testRuntimeOnly("ch.qos.logback:logback-classic") +} diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/AbstractFreeMarkerConfiguration.java b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/AbstractFreeMarkerConfiguration.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/AbstractFreeMarkerConfiguration.java rename to spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/AbstractFreeMarkerConfiguration.java index ba352f78a7..3dbfa70eb2 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/AbstractFreeMarkerConfiguration.java +++ b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/AbstractFreeMarkerConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import java.util.HashMap; import java.util.List; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfiguration.java b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfiguration.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfiguration.java rename to spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfiguration.java index 79331b21dd..7c12e084ca 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfiguration.java +++ b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import java.util.ArrayList; import java.util.List; @@ -37,7 +37,7 @@ import org.springframework.ui.freemarker.FreeMarkerConfigurationFactory; * @author Andy Wilkinson * @author Dave Syer * @author Kazuki Shimizu - * @since 1.1.0 + * @since 4.0.0 */ @AutoConfiguration @ConditionalOnClass({ freemarker.template.Configuration.class, FreeMarkerConfigurationFactory.class }) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerNonWebConfiguration.java b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerNonWebConfiguration.java similarity index 93% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerNonWebConfiguration.java rename to spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerNonWebConfiguration.java index 89d572c877..e0fc9c794e 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerNonWebConfiguration.java +++ b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerNonWebConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerProperties.java b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerProperties.java similarity index 99% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerProperties.java rename to spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerProperties.java index c0c9c5576b..65a2a978b2 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerProperties.java +++ b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; @@ -33,7 +33,7 @@ import org.springframework.web.servlet.view.AbstractTemplateViewResolver; * * @author Dave Syer * @author Andy Wilkinson - * @since 1.1.0 + * @since 4.0.0 */ @ConfigurationProperties("spring.freemarker") public class FreeMarkerProperties { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerReactiveWebConfiguration.java b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerReactiveWebConfiguration.java similarity index 90% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerReactiveWebConfiguration.java rename to spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerReactiveWebConfiguration.java index 009ede2484..3ee8322ce2 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerReactiveWebConfiguration.java +++ b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerReactiveWebConfiguration.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; -import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.reactive.result.view.freemarker.FreeMarkerConfig; @@ -36,7 +36,8 @@ import org.springframework.web.reactive.result.view.freemarker.FreeMarkerViewRes */ @Configuration(proxyBeanMethods = false) @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE) -@AutoConfigureAfter(WebFluxAutoConfiguration.class) +@ConditionalOnClass(FreeMarkerConfigurer.class) +@AutoConfigureAfter(name = "org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration") class FreeMarkerReactiveWebConfiguration extends AbstractFreeMarkerConfiguration { FreeMarkerReactiveWebConfiguration(FreeMarkerProperties properties, diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerServletWebConfiguration.java b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerServletWebConfiguration.java similarity index 94% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerServletWebConfiguration.java rename to spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerServletWebConfiguration.java index 0a448b8421..e88ef2e521 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerServletWebConfiguration.java +++ b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerServletWebConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import jakarta.servlet.DispatcherType; import jakarta.servlet.Servlet; @@ -27,7 +27,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingFilterBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.web.ConditionalOnEnabledResourceChain; -import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -45,7 +44,7 @@ import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver; @Configuration(proxyBeanMethods = false) @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET) @ConditionalOnClass({ Servlet.class, FreeMarkerConfigurer.class }) -@AutoConfigureAfter(WebMvcAutoConfiguration.class) +@AutoConfigureAfter(name = "org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration") class FreeMarkerServletWebConfiguration extends AbstractFreeMarkerConfiguration { protected FreeMarkerServletWebConfiguration(FreeMarkerProperties properties, diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerTemplateAvailabilityProvider.java b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerTemplateAvailabilityProvider.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerTemplateAvailabilityProvider.java rename to spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerTemplateAvailabilityProvider.java index 10f9fed1ce..bfe2270051 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerTemplateAvailabilityProvider.java +++ b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerTemplateAvailabilityProvider.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import java.util.ArrayList; import java.util.Arrays; @@ -32,7 +32,7 @@ import org.springframework.util.ClassUtils; * FreeMarker view templates. * * @author Andy Wilkinson - * @since 1.1.0 + * @since 4.0.0 */ public class FreeMarkerTemplateAvailabilityProvider extends PathBasedTemplateAvailabilityProvider { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerVariablesCustomizer.java b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerVariablesCustomizer.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerVariablesCustomizer.java rename to spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerVariablesCustomizer.java index 7d072d63e0..8d6cdd255a 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerVariablesCustomizer.java +++ b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerVariablesCustomizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import java.util.Map; @@ -28,7 +28,7 @@ import org.springframework.ui.freemarker.FreeMarkerConfigurationFactory; * before it is used by an auto-configured {@link FreeMarkerConfigurationFactory}. * * @author Stephane Nicoll - * @since 3.4.0 + * @since 4.0.0 */ @FunctionalInterface public interface FreeMarkerVariablesCustomizer { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/package-info.java b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/package-info.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/package-info.java rename to spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/package-info.java index 769db9ecc5..51302ce797 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/freemarker/package-info.java +++ b/spring-boot-project/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker/autoconfigure/package-info.java @@ -17,4 +17,4 @@ /** * Auto-configuration for FreeMarker. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; diff --git a/spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 0000000000..4d823ad88e --- /dev/null +++ b/spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,45 @@ +{ + "groups": [], + "properties": [ + { + "name": "spring.freemarker.allow-request-override", + "description": "Whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. Only supported with Spring MVC." + }, + { + "name": "spring.freemarker.allow-session-override", + "description": "Whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. Only supported with Spring MVC." + }, + { + "name": "spring.freemarker.cache", + "description": "Whether to enable template caching. Only supported with Spring MVC." + }, + { + "name": "spring.freemarker.content-type", + "description": "Content-Type value. Only supported with Spring MVC." + }, + { + "name": "spring.freemarker.expose-request-attributes", + "description": "Whether all request attributes should be added to the model prior to merging with the template. Only supported with Spring MVC." + }, + { + "name": "spring.freemarker.expose-session-attributes", + "description": "Whether all HttpSession attributes should be added to the model prior to merging with the template. Only supported with Spring MVC." + }, + { + "name": "spring.freemarker.expose-spring-macro-helpers", + "description": "Whether to expose a RequestContext for use by Spring's macro library, under the name \"springMacroRequestContext\". Only supported with Spring MVC." + }, + { + "name": "spring.freemarker.prefix", + "defaultValue": "" + }, + { + "name": "spring.freemarker.suffix", + "defaultValue": ".ftlh" + } + ], + "hints": [], + "ignored": { + "properties": [] + } +} diff --git a/spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000000..d641c14f07 --- /dev/null +++ b/spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Template Availability Providers +org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider=\ +org.springframework.boot.freemarker.autoconfigure.FreeMarkerTemplateAvailabilityProvider diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/aot.factories b/spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/spring/aot.factories similarity index 65% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/aot.factories rename to spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/spring/aot.factories index ca3cf091a2..59f8b40337 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/aot.factories +++ b/spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/spring/aot.factories @@ -1,2 +1,2 @@ org.springframework.aot.hint.RuntimeHintsRegistrar=\ -org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider$FreeMarkerTemplateAvailabilityRuntimeHints +org.springframework.boot.freemarker.autoconfigure.FreeMarkerTemplateAvailabilityProvider$FreeMarkerTemplateAvailabilityRuntimeHints diff --git a/spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000000..6a71b86fac --- /dev/null +++ b/spring-boot-project/spring-boot-freemarker/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +org.springframework.boot.freemarker.autoconfigure.FreeMarkerAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationReactiveIntegrationTests.java b/spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfigurationReactiveIntegrationTests.java similarity index 98% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationReactiveIntegrationTests.java rename to spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfigurationReactiveIntegrationTests.java index 14644c63c8..d641d608cf 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationReactiveIntegrationTests.java +++ b/spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfigurationReactiveIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import java.io.StringWriter; import java.time.Duration; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationServletIntegrationTests.java b/spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfigurationServletIntegrationTests.java similarity index 99% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationServletIntegrationTests.java rename to spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfigurationServletIntegrationTests.java index 0806826649..5626b62e5a 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationServletIntegrationTests.java +++ b/spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfigurationServletIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import java.io.StringWriter; import java.util.EnumSet; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationTests.java b/spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfigurationTests.java similarity index 83% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationTests.java rename to spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfigurationTests.java index c80bfc3fcb..8cf4af44bc 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerAutoConfigurationTests.java @@ -14,19 +14,19 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; -import java.io.File; import java.io.StringWriter; +import java.nio.file.Path; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.api.io.TempDir; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.system.CapturedOutput; import org.springframework.boot.test.system.OutputCaptureExtension; -import org.springframework.boot.testsupport.BuildOutput; import org.springframework.boot.testsupport.classpath.resources.WithResource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -46,8 +46,6 @@ import static org.mockito.Mockito.mock; @ExtendWith(OutputCaptureExtension.class) class FreeMarkerAutoConfigurationTests { - private final BuildOutput buildOutput = new BuildOutput(getClass()); - private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withConfiguration(AutoConfigurations.of(FreeMarkerAutoConfiguration.class)); @@ -71,20 +69,16 @@ class FreeMarkerAutoConfigurationTests { } @Test - void emptyTemplateLocation(CapturedOutput output) { - File emptyDirectory = new File(this.buildOutput.getTestResourcesLocation(), "empty-templates/empty-directory"); - emptyDirectory.mkdirs(); - this.contextRunner - .withPropertyValues("spring.freemarker.templateLoaderPath:classpath:/empty-templates/empty-directory/") + void emptyTemplateLocation(CapturedOutput output, @TempDir Path tempDir) { + this.contextRunner.withPropertyValues("spring.freemarker.templateLoaderPath:file:" + tempDir.toAbsolutePath()) .run((context) -> assertThat(output).doesNotContain("Cannot find template location")); } @Test - void nonExistentLocationAndEmptyLocation(CapturedOutput output) { - new File(this.buildOutput.getTestResourcesLocation(), "empty-templates/empty-directory").mkdirs(); + void nonExistentLocationAndEmptyLocation(CapturedOutput output, @TempDir Path tempDir) { this.contextRunner - .withPropertyValues("spring.freemarker.templateLoaderPath:" - + "classpath:/does-not-exist/,classpath:/empty-templates/empty-directory/") + .withPropertyValues("spring.freemarker.templateLoaderPath:" + "classpath:/does-not-exist/,file:" + + tempDir.toAbsolutePath()) .run((context) -> assertThat(output).doesNotContain("Cannot find template location")); } diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerPropertiesTests.java b/spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerPropertiesTests.java similarity index 97% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerPropertiesTests.java rename to spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerPropertiesTests.java index f93378a0f1..06f0805b66 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerPropertiesTests.java +++ b/spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerPropertiesTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import java.nio.charset.StandardCharsets; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerTemplateAvailabilityProviderTests.java b/spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerTemplateAvailabilityProviderTests.java similarity index 95% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerTemplateAvailabilityProviderTests.java rename to spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerTemplateAvailabilityProviderTests.java index 1c510f5c5b..5ebabde0da 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerTemplateAvailabilityProviderTests.java +++ b/spring-boot-project/spring-boot-freemarker/src/test/java/org/springframework/boot/freemarker/autoconfigure/FreeMarkerTemplateAvailabilityProviderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.freemarker; +package org.springframework.boot.freemarker.autoconfigure; import org.junit.jupiter.api.Test; @@ -22,9 +22,9 @@ import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.RuntimeHintsRegistrar; import org.springframework.aot.hint.TypeHint; import org.springframework.beans.factory.aot.AotServices; -import org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider.FreeMarkerTemplateAvailabilityProperties; -import org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider.FreeMarkerTemplateAvailabilityRuntimeHints; import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider; +import org.springframework.boot.freemarker.autoconfigure.FreeMarkerTemplateAvailabilityProvider.FreeMarkerTemplateAvailabilityProperties; +import org.springframework.boot.freemarker.autoconfigure.FreeMarkerTemplateAvailabilityProvider.FreeMarkerTemplateAvailabilityRuntimeHints; import org.springframework.boot.testsupport.classpath.resources.WithResource; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.ResourceLoader; diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-freemarker/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-freemarker/build.gradle index 47930b9c56..ac51b94fdf 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-freemarker/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-freemarker/build.gradle @@ -6,6 +6,5 @@ description = "Starter for building MVC web applications using FreeMarker views" dependencies { api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) - api("org.freemarker:freemarker") - api("org.springframework:spring-context-support") + api(project(":spring-boot-project:spring-boot-freemarker")) } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle index 86eb6f31ce..f2d185d4c9 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle @@ -94,6 +94,7 @@ dependencies { testImplementation(project(":spring-boot-project:spring-boot-actuator")) testImplementation(project(":spring-boot-project:spring-boot-actuator-autoconfigure")) + testImplementation(project(":spring-boot-project:spring-boot-freemarker")) testImplementation(project(":spring-boot-project:spring-boot-testcontainers")) testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) testImplementation("ch.qos.logback:logback-classic") diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux.imports b/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux.imports index a9234fb44a..311994e3d1 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux.imports +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebFlux.imports @@ -1,9 +1,9 @@ # AutoConfigureWebFlux auto-configuration imports org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration -org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration +optional:org.springframework.boot.freemarker.autoconfigure.FreeMarkerAutoConfiguration org.springframework.boot.autoconfigure.http.codec.CodecsAutoConfiguration org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration optional:org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration -org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration \ No newline at end of file +org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc.imports b/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc.imports index db5431f52b..cc076aa697 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc.imports +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc.imports @@ -1,7 +1,7 @@ # AutoConfigureWebMvc auto-configuration imports org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration -org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration +optional:org.springframework.boot.freemarker.autoconfigure.FreeMarkerAutoConfiguration org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration @@ -11,4 +11,4 @@ optional:org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAu optional:org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration -org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration \ No newline at end of file +org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/WebFluxTestAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/WebFluxTestAutoConfigurationIntegrationTests.java index 49cecbe627..83132c15a3 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/WebFluxTestAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/webclient/WebFluxTestAutoConfigurationIntegrationTests.java @@ -20,12 +20,12 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration; -import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration; import org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration; import org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration; import org.springframework.boot.autoconfigure.security.oauth2.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration; import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration; import org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration; +import org.springframework.boot.freemarker.autoconfigure.FreeMarkerAutoConfiguration; import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest; import org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration; import org.springframework.context.ApplicationContext; diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTestAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTestAutoConfigurationIntegrationTests.java index 9787442fd7..26dd984645 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTestAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTestAutoConfigurationIntegrationTests.java @@ -19,13 +19,13 @@ package org.springframework.boot.test.autoconfigure.web.servlet; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration; import org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration; import org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientAutoConfiguration; import org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration; import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration; import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration; import org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration; +import org.springframework.boot.freemarker.autoconfigure.FreeMarkerAutoConfiguration; import org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAutoConfiguration; import org.springframework.context.ApplicationContext; import org.springframework.core.task.AsyncTaskExecutor;