Create spring-boot-groovy-templates module
This commit is contained in:
@@ -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-groovy-templates"
|
||||
include "spring-boot-project:spring-boot-jackson"
|
||||
include "spring-boot-project:spring-boot-jdbc"
|
||||
include "spring-boot-project:spring-boot-jetty"
|
||||
|
||||
@@ -97,7 +97,6 @@ dependencies {
|
||||
optional("org.apache.tomcat.embed:tomcat-embed-websocket")
|
||||
optional("org.apache.tomcat:tomcat-jdbc")
|
||||
optional("org.apiguardian:apiguardian-api")
|
||||
optional("org.apache.groovy:groovy-templates")
|
||||
optional("org.eclipse.angus:angus-mail")
|
||||
optional("com.github.ben-manes.caffeine:caffeine")
|
||||
optional("com.github.mxab.thymeleaf.extras:thymeleaf-extras-data-attribute")
|
||||
@@ -256,12 +255,6 @@ dependencies {
|
||||
testRuntimeOnly("org.jetbrains.kotlin:kotlin-reflect")
|
||||
}
|
||||
|
||||
tasks.named("checkSpringConfigurationMetadata").configure {
|
||||
exclusions = [
|
||||
"spring.groovy.template.configuration.*"
|
||||
]
|
||||
}
|
||||
|
||||
test {
|
||||
jvmArgs += "--add-opens=java.base/java.net=ALL-UNNAMED"
|
||||
}
|
||||
|
||||
@@ -803,110 +803,6 @@
|
||||
"name": "spring.graphql.schema.locations",
|
||||
"defaultValue": "classpath:graphql/**/"
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.auto-escape",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.auto-escape",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.auto-indent",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.auto-indent",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.auto-indent-string",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.auto-indent-string",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.auto-new-line",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.auto-new-line",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.base-template-class",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.base-template-class",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.cache-templates",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.cache",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.declaration-encoding",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.declaration-encoding",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.expand-empty-elements",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.expand-empty-elements",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.locale",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.locale",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.new-line-string",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.new-line-string",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.resource-loader-path",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.resource-loader-path",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.use-double-quotes",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.use-double-quotes",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.prefix",
|
||||
"defaultValue": ""
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.suffix",
|
||||
"defaultValue": ".tpl"
|
||||
},
|
||||
{
|
||||
"name": "spring.http.converters.preferred-json-mapper",
|
||||
"type": "java.lang.String",
|
||||
|
||||
@@ -19,7 +19,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.groovy.template.GroovyTemplateAvailabilityProvider,\
|
||||
org.springframework.boot.autoconfigure.mustache.MustacheTemplateAvailabilityProvider,\
|
||||
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafTemplateAvailabilityProvider,\
|
||||
org.springframework.boot.autoconfigure.web.servlet.JspTemplateAvailabilityProvider
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
org.springframework.aot.hint.RuntimeHintsRegistrar=\
|
||||
org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider$FreeMarkerTemplateAvailabilityRuntimeHints,\
|
||||
org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAvailabilityProvider$GroovyTemplateAvailabilityRuntimeHints
|
||||
org.springframework.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider$FreeMarkerTemplateAvailabilityRuntimeHints
|
||||
|
||||
@@ -48,7 +48,6 @@ org.springframework.boot.autoconfigure.graphql.rsocket.RSocketGraphQlClientAutoC
|
||||
org.springframework.boot.autoconfigure.graphql.security.GraphQlWebFluxSecurityAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.graphql.security.GraphQlWebMvcSecurityAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.graphql.servlet.GraphQlWebMvcAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.h2.H2ConsoleAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration
|
||||
|
||||
@@ -1987,6 +1987,7 @@ bom {
|
||||
"spring-boot-devtools",
|
||||
"spring-boot-docker-compose",
|
||||
"spring-boot-flyway",
|
||||
"spring-boot-groovy-templates",
|
||||
"spring-boot-jackson",
|
||||
"spring-boot-jarmode-tools",
|
||||
"spring-boot-jdbc",
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
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 Groovy Templates"
|
||||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot"))
|
||||
api("org.apache.groovy:groovy-templates")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional("org.springframework:spring-webmvc")
|
||||
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")
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.groovy.template;
|
||||
package org.springframework.boot.groovy.template.autoconfigure;
|
||||
|
||||
import java.security.CodeSource;
|
||||
import java.security.ProtectionDomain;
|
||||
@@ -32,7 +32,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
|
||||
import org.springframework.boot.autoconfigure.template.TemplateLocation;
|
||||
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.PropertyMapper;
|
||||
import org.springframework.boot.context.properties.bind.Bindable;
|
||||
@@ -57,9 +56,9 @@ import org.springframework.web.servlet.view.groovy.GroovyMarkupViewResolver;
|
||||
* @author Dave Syer
|
||||
* @author Andy Wilkinson
|
||||
* @author Brian Clozel
|
||||
* @since 1.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(after = WebMvcAutoConfiguration.class)
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass(MarkupTemplateEngine.class)
|
||||
@EnableConfigurationProperties(GroovyTemplateProperties.class)
|
||||
public class GroovyTemplateAutoConfiguration {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.groovy.template;
|
||||
package org.springframework.boot.groovy.template.autoconfigure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -32,7 +32,7 @@ import org.springframework.util.ClassUtils;
|
||||
* view templates.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @since 1.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class GroovyTemplateAvailabilityProvider extends PathBasedTemplateAvailabilityProvider {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.groovy.template;
|
||||
package org.springframework.boot.groovy.template.autoconfigure;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@@ -36,7 +36,7 @@ import org.springframework.web.servlet.view.AbstractTemplateViewResolver;
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Marten Deinum
|
||||
* @since 1.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("spring.groovy.template")
|
||||
public class GroovyTemplateProperties {
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Auto-configuration for Groovy templates.
|
||||
*/
|
||||
package org.springframework.boot.autoconfigure.groovy.template;
|
||||
package org.springframework.boot.groovy.template.autoconfigure;
|
||||
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.auto-escape",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.auto-escape",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.auto-indent",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.auto-indent",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.auto-indent-string",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.auto-indent-string",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.auto-new-line",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.auto-new-line",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.base-template-class",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.base-template-class",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.cache-templates",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.cache",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.declaration-encoding",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.declaration-encoding",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.expand-empty-elements",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.expand-empty-elements",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.locale",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.locale",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.new-line-string",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.new-line-string",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.resource-loader-path",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.resource-loader-path",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.configuration.use-double-quotes",
|
||||
"deprecation": {
|
||||
"replacement": "spring.groovy.template.use-double-quotes",
|
||||
"level": "warning",
|
||||
"since": "3.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.prefix",
|
||||
"defaultValue": ""
|
||||
},
|
||||
{
|
||||
"name": "spring.groovy.template.suffix",
|
||||
"defaultValue": ".tpl"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# Template Availability Providers
|
||||
org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider=\
|
||||
org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAvailabilityProvider
|
||||
@@ -0,0 +1,2 @@
|
||||
org.springframework.aot.hint.RuntimeHintsRegistrar=\
|
||||
org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAvailabilityProvider$GroovyTemplateAvailabilityRuntimeHints
|
||||
@@ -0,0 +1 @@
|
||||
org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAutoConfiguration
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.groovy.template;
|
||||
package org.springframework.boot.groovy.template.autoconfigure;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.StringWriter;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.groovy.template;
|
||||
package org.springframework.boot.groovy.template.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.groovy.template.GroovyTemplateAvailabilityProvider.GroovyTemplateAvailabilityProperties;
|
||||
import org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAvailabilityProvider.GroovyTemplateAvailabilityRuntimeHints;
|
||||
import org.springframework.boot.autoconfigure.template.TemplateAvailabilityProvider;
|
||||
import org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAvailabilityProvider.GroovyTemplateAvailabilityProperties;
|
||||
import org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAvailabilityProvider.GroovyTemplateAvailabilityRuntimeHints;
|
||||
import org.springframework.boot.testsupport.classpath.resources.WithResource;
|
||||
import org.springframework.core.io.DefaultResourceLoader;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.autoconfigure.groovy.template;
|
||||
package org.springframework.boot.groovy.template.autoconfigure;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
@@ -5,6 +5,6 @@ plugins {
|
||||
description = "Starter for building MVC web applications using Groovy Templates views"
|
||||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot-groovy-templates"))
|
||||
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
|
||||
api("org.apache.groovy:groovy-templates")
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ dependencies {
|
||||
dockerTestRuntimeOnly("org.springframework.data:spring-data-redis")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-flyway"))
|
||||
optional(project(":spring-boot-project:spring-boot-groovy-templates"))
|
||||
optional(project(":spring-boot-project:spring-boot-jackson"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-jsonb"))
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration
|
||||
optional:org.springframework.boot.groovy.template.autoconfigure.GroovyTemplateAutoConfiguration
|
||||
optional:org.springframework.boot.validation.autoconfigure.ValidationAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration
|
||||
org.springframework.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration
|
||||
|
||||
@@ -20,13 +20,13 @@ 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.groovy.template.GroovyTemplateAutoConfiguration;
|
||||
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.groovy.template.autoconfigure.GroovyTemplateAutoConfiguration;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.core.task.AsyncTaskExecutor;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
|
||||
|
||||
Reference in New Issue
Block a user