Skip to content

Commit 0b9572d

Browse files
committed
Create spring-boot-groovy-templates module
1 parent cc0befb commit 0b9572d

File tree

23 files changed

+157
-132
lines changed

23 files changed

+157
-132
lines changed

settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ include "spring-boot-project:spring-boot-devtools"
5252
include "spring-boot-project:spring-boot-docker-compose"
5353
include "spring-boot-project:spring-boot-docs"
5454
include "spring-boot-project:spring-boot-flyway"
55+
include "spring-boot-project:spring-boot-groovy-templates"
5556
include "spring-boot-project:spring-boot-jackson"
5657
include "spring-boot-project:spring-boot-jdbc"
5758
include "spring-boot-project:spring-boot-jetty"

spring-boot-project/spring-boot-autoconfigure-all/build.gradle

-7
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ dependencies {
102102
optional("org.apache.tomcat.embed:tomcat-embed-websocket")
103103
optional("org.apache.tomcat:tomcat-jdbc")
104104
optional("org.apiguardian:apiguardian-api")
105-
optional("org.apache.groovy:groovy-templates")
106105
optional("org.eclipse.angus:angus-mail")
107106
optional("com.github.ben-manes.caffeine:caffeine")
108107
optional("com.github.mxab.thymeleaf.extras:thymeleaf-extras-data-attribute")
@@ -274,12 +273,6 @@ dependencies {
274273
testRuntimeOnly("org.jetbrains.kotlin:kotlin-reflect")
275274
}
276275

277-
tasks.named("checkSpringConfigurationMetadata").configure {
278-
exclusions = [
279-
"spring.groovy.template.configuration.*"
280-
]
281-
}
282-
283276
test {
284277
jvmArgs += "--add-opens=java.base/java.net=ALL-UNNAMED"
285278
}

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json

-104
Original file line numberDiff line numberDiff line change
@@ -889,110 +889,6 @@
889889
"name": "spring.graphql.schema.locations",
890890
"defaultValue": "classpath:graphql/**/"
891891
},
892-
{
893-
"name": "spring.groovy.template.configuration.auto-escape",
894-
"deprecation": {
895-
"replacement": "spring.groovy.template.auto-escape",
896-
"level": "warning",
897-
"since": "3.5.0"
898-
}
899-
},
900-
{
901-
"name": "spring.groovy.template.configuration.auto-indent",
902-
"deprecation": {
903-
"replacement": "spring.groovy.template.auto-indent",
904-
"level": "warning",
905-
"since": "3.5.0"
906-
}
907-
},
908-
{
909-
"name": "spring.groovy.template.configuration.auto-indent-string",
910-
"deprecation": {
911-
"replacement": "spring.groovy.template.auto-indent-string",
912-
"level": "warning",
913-
"since": "3.5.0"
914-
}
915-
},
916-
{
917-
"name": "spring.groovy.template.configuration.auto-new-line",
918-
"deprecation": {
919-
"replacement": "spring.groovy.template.auto-new-line",
920-
"level": "warning",
921-
"since": "3.5.0"
922-
}
923-
},
924-
{
925-
"name": "spring.groovy.template.configuration.base-template-class",
926-
"deprecation": {
927-
"replacement": "spring.groovy.template.base-template-class",
928-
"level": "warning",
929-
"since": "3.5.0"
930-
}
931-
},
932-
{
933-
"name": "spring.groovy.template.configuration.cache-templates",
934-
"deprecation": {
935-
"replacement": "spring.groovy.template.cache",
936-
"level": "warning",
937-
"since": "3.5.0"
938-
}
939-
},
940-
{
941-
"name": "spring.groovy.template.configuration.declaration-encoding",
942-
"deprecation": {
943-
"replacement": "spring.groovy.template.declaration-encoding",
944-
"level": "warning",
945-
"since": "3.5.0"
946-
}
947-
},
948-
{
949-
"name": "spring.groovy.template.configuration.expand-empty-elements",
950-
"deprecation": {
951-
"replacement": "spring.groovy.template.expand-empty-elements",
952-
"level": "warning",
953-
"since": "3.5.0"
954-
}
955-
},
956-
{
957-
"name": "spring.groovy.template.configuration.locale",
958-
"deprecation": {
959-
"replacement": "spring.groovy.template.locale",
960-
"level": "warning",
961-
"since": "3.5.0"
962-
}
963-
},
964-
{
965-
"name": "spring.groovy.template.configuration.new-line-string",
966-
"deprecation": {
967-
"replacement": "spring.groovy.template.new-line-string",
968-
"level": "warning",
969-
"since": "3.5.0"
970-
}
971-
},
972-
{
973-
"name": "spring.groovy.template.configuration.resource-loader-path",
974-
"deprecation": {
975-
"replacement": "spring.groovy.template.resource-loader-path",
976-
"level": "warning",
977-
"since": "3.5.0"
978-
}
979-
},
980-
{
981-
"name": "spring.groovy.template.configuration.use-double-quotes",
982-
"deprecation": {
983-
"replacement": "spring.groovy.template.use-double-quotes",
984-
"level": "warning",
985-
"since": "3.5.0"
986-
}
987-
},
988-
{
989-
"name": "spring.groovy.template.prefix",
990-
"defaultValue": ""
991-
},
992-
{
993-
"name": "spring.groovy.template.suffix",
994-
"defaultValue": ".tpl"
995-
},
996892
{
997893
"name": "spring.http.converters.preferred-json-mapper",
998894
"type": "java.lang.String",

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ org.springframework.boot.autoconfigure.r2dbc.NoConnectionFactoryBeanFailureAnaly
1919
# Template Availability Providers
2020
org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider=\
2121
org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider,\
22-
org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAvailabilityProvider,\
2322
org.springframework.boot.autoconfigure.mustache.MustacheTemplateAvailabilityProvider,\
2423
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafTemplateAvailabilityProvider,\
2524
org.springframework.boot.autoconfigure.web.servlet.JspTemplateAvailabilityProvider
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
org.springframework.aot.hint.RuntimeHintsRegistrar=\
2-
org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider$FreeMarkerTemplateAvailabilityRuntimeHints,\
3-
org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAvailabilityProvider$GroovyTemplateAvailabilityRuntimeHints
2+
org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider$FreeMarkerTemplateAvailabilityRuntimeHints

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ org.springframework.boot.autoconfigure.graphql.rsocket.RSocketGraphQlClientAutoC
4848
org.springframework.boot.autoconfigure.graphql.security.GraphQlWebFluxSecurityAutoConfiguration
4949
org.springframework.boot.autoconfigure.graphql.security.GraphQlWebMvcSecurityAutoConfiguration
5050
org.springframework.boot.autoconfigure.graphql.servlet.GraphQlWebMvcAutoConfiguration
51-
org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration
5251
org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration
5352
org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration
5453
org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration

spring-boot-project/spring-boot-dependencies/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -2031,6 +2031,7 @@ bom {
20312031
"spring-boot-devtools",
20322032
"spring-boot-docker-compose",
20332033
"spring-boot-flyway",
2034+
"spring-boot-groovy-templates",
20342035
"spring-boot-jackson",
20352036
"spring-boot-jarmode-tools",
20362037
"spring-boot-jdbc",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
plugins {
2+
id "java-library"
3+
id "org.springframework.boot.auto-configuration"
4+
id "org.springframework.boot.configuration-properties"
5+
id "org.springframework.boot.deployed"
6+
id "org.springframework.boot.optional-dependencies"
7+
}
8+
9+
description = "Spring Boot Groovy Templates"
10+
11+
dependencies {
12+
api(project(":spring-boot-project:spring-boot"))
13+
api("org.apache.groovy:groovy-templates")
14+
15+
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
16+
optional("org.springframework:spring-webmvc")
17+
optional("jakarta.servlet:jakarta.servlet-api")
18+
19+
testImplementation(project(":spring-boot-project:spring-boot-test"))
20+
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
21+
22+
testRuntimeOnly("ch.qos.logback:logback-classic")
23+
}
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.groovy.template;
17+
package org.springframework.boot.groovy.template.autoconfigure;
1818

1919
import java.security.CodeSource;
2020
import java.security.ProtectionDomain;
@@ -32,7 +32,6 @@
3232
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
3333
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
3434
import org.springframework.boot.autoconfigure.template.TemplateLocation;
35-
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
3635
import org.springframework.boot.context.properties.EnableConfigurationProperties;
3736
import org.springframework.boot.context.properties.PropertyMapper;
3837
import org.springframework.boot.context.properties.bind.Bindable;
@@ -57,9 +56,9 @@
5756
* @author Dave Syer
5857
* @author Andy Wilkinson
5958
* @author Brian Clozel
60-
* @since 1.1.0
59+
* @since 4.0.0
6160
*/
62-
@AutoConfiguration(after = WebMvcAutoConfiguration.class)
61+
@AutoConfiguration
6362
@ConditionalOnClass(MarkupTemplateEngine.class)
6463
@EnableConfigurationProperties(GroovyTemplateProperties.class)
6564
public class GroovyTemplateAutoConfiguration {
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.groovy.template;
17+
package org.springframework.boot.groovy.template.autoconfigure;
1818

1919
import java.util.ArrayList;
2020
import java.util.Arrays;
@@ -32,7 +32,7 @@
3232
* view templates.
3333
*
3434
* @author Dave Syer
35-
* @since 1.1.0
35+
* @since 4.0.0
3636
*/
3737
public class GroovyTemplateAvailabilityProvider extends PathBasedTemplateAvailabilityProvider {
3838

Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.groovy.template;
17+
package org.springframework.boot.groovy.template.autoconfigure;
1818

1919
import java.nio.charset.Charset;
2020
import java.nio.charset.StandardCharsets;
@@ -36,7 +36,7 @@
3636
*
3737
* @author Dave Syer
3838
* @author Marten Deinum
39-
* @since 1.1.0
39+
* @since 4.0.0
4040
*/
4141
@ConfigurationProperties("spring.groovy.template")
4242
public class GroovyTemplateProperties {
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
/**
1818
* Auto-configuration for Groovy templates.
1919
*/
20-
package org.springframework.boot.autoconfigure.groovy.template;
20+
package org.springframework.boot.groovy.template.autoconfigure;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"properties": [
3+
{
4+
"name": "spring.groovy.template.configuration.auto-escape",
5+
"deprecation": {
6+
"replacement": "spring.groovy.template.auto-escape",
7+
"level": "warning",
8+
"since": "3.5.0"
9+
}
10+
},
11+
{
12+
"name": "spring.groovy.template.configuration.auto-indent",
13+
"deprecation": {
14+
"replacement": "spring.groovy.template.auto-indent",
15+
"level": "warning",
16+
"since": "3.5.0"
17+
}
18+
},
19+
{
20+
"name": "spring.groovy.template.configuration.auto-indent-string",
21+
"deprecation": {
22+
"replacement": "spring.groovy.template.auto-indent-string",
23+
"level": "warning",
24+
"since": "3.5.0"
25+
}
26+
},
27+
{
28+
"name": "spring.groovy.template.configuration.auto-new-line",
29+
"deprecation": {
30+
"replacement": "spring.groovy.template.auto-new-line",
31+
"level": "warning",
32+
"since": "3.5.0"
33+
}
34+
},
35+
{
36+
"name": "spring.groovy.template.configuration.base-template-class",
37+
"deprecation": {
38+
"replacement": "spring.groovy.template.base-template-class",
39+
"level": "warning",
40+
"since": "3.5.0"
41+
}
42+
},
43+
{
44+
"name": "spring.groovy.template.configuration.cache-templates",
45+
"deprecation": {
46+
"replacement": "spring.groovy.template.cache",
47+
"level": "warning",
48+
"since": "3.5.0"
49+
}
50+
},
51+
{
52+
"name": "spring.groovy.template.configuration.declaration-encoding",
53+
"deprecation": {
54+
"replacement": "spring.groovy.template.declaration-encoding",
55+
"level": "warning",
56+
"since": "3.5.0"
57+
}
58+
},
59+
{
60+
"name": "spring.groovy.template.configuration.expand-empty-elements",
61+
"deprecation": {
62+
"replacement": "spring.groovy.template.expand-empty-elements",
63+
"level": "warning",
64+
"since": "3.5.0"
65+
}
66+
},
67+
{
68+
"name": "spring.groovy.template.configuration.locale",
69+
"deprecation": {
70+
"replacement": "spring.groovy.template.locale",
71+
"level": "warning",
72+
"since": "3.5.0"
73+
}
74+
},
75+
{
76+
"name": "spring.groovy.template.configuration.new-line-string",
77+
"deprecation": {
78+
"replacement": "spring.groovy.template.new-line-string",
79+
"level": "warning",
80+
"since": "3.5.0"
81+
}
82+
},
83+
{
84+
"name": "spring.groovy.template.configuration.resource-loader-path",
85+
"deprecation": {
86+
"replacement": "spring.groovy.template.resource-loader-path",
87+
"level": "warning",
88+
"since": "3.5.0"
89+
}
90+
},
91+
{
92+
"name": "spring.groovy.template.configuration.use-double-quotes",
93+
"deprecation": {
94+
"replacement": "spring.groovy.template.use-double-quotes",
95+
"level": "warning",
96+
"since": "3.5.0"
97+
}
98+
},
99+
{
100+
"name": "spring.groovy.template.prefix",
101+
"defaultValue": ""
102+
},
103+
{
104+
"name": "spring.groovy.template.suffix",
105+
"defaultValue": ".tpl"
106+
}
107+
]
108+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Template Availability Providers
2+
org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider=\
3+
org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAvailabilityProvider
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
org.springframework.aot.hint.RuntimeHintsRegistrar=\
2+
org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAvailabilityProvider$GroovyTemplateAvailabilityRuntimeHints
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.groovy.template;
17+
package org.springframework.boot.groovy.template.autoconfigure;
1818

1919
import java.io.File;
2020
import java.io.StringWriter;

0 commit comments

Comments
 (0)