From 6c07c3a18952ec9e1cb6c90f8e807170c64fae30 Mon Sep 17 00:00:00 2001 From: Dmitriy Dovnar Date: Thu, 18 Apr 2024 19:27:35 +0300 Subject: [PATCH 1/6] mvc-thymeleaf extension --- ext/mvc-thymeleaf/pom.xml | 63 ++++++++++++++++ .../ThymeleafConfigurationFactory.java | 7 ++ .../ThymeleafDefaultConfigurationFactory.java | 40 ++++++++++ .../mvc/thymeleaf/ThymeleafMvcFeature.java | 32 ++++++++ ...ThymeleafSuppliedConfigurationFactory.java | 17 +++++ .../mvc/thymeleaf/ThymeleafViewProcessor.java | 75 +++++++++++++++++++ .../server/mvc/thymeleaf/package-info.java | 1 + ext/pom.xml | 1 + pom.xml | 4 + 9 files changed, 240 insertions(+) create mode 100644 ext/mvc-thymeleaf/pom.xml create mode 100644 ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java create mode 100644 ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java create mode 100644 ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java create mode 100644 ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java create mode 100644 ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java create mode 100644 ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java diff --git a/ext/mvc-thymeleaf/pom.xml b/ext/mvc-thymeleaf/pom.xml new file mode 100644 index 0000000000..0f2740f6bd --- /dev/null +++ b/ext/mvc-thymeleaf/pom.xml @@ -0,0 +1,63 @@ + + + 4.0.0 + + + project + org.glassfish.jersey.ext + 3.0.99-SNAPSHOT + + + jersey-mvc-thymeleaf + jersey-ext-mvc-thymeleaf + + + Jersey extension module providing support for Thymeleaf templates. + + + + + + org.apache.felix + maven-bundle-plugin + true + true + + + org.glassfish.jersey.server.mvc.thymeleaf.*;version=${project.version} + + true + + + + + + ${project.build.directory}/legal + + + + + + + jakarta.servlet + jakarta.servlet-api + ${servlet5.version} + provided + + + + org.glassfish.jersey.ext + jersey-mvc + ${project.version} + + + + org.thymeleaf + thymeleaf + ${thymeleaf.version} + + + + \ No newline at end of file diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java new file mode 100644 index 0000000000..466fe377f9 --- /dev/null +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java @@ -0,0 +1,7 @@ +package org.glassfish.jersey.server.mvc.thymeleaf; + +import org.thymeleaf.TemplateEngine; + +public interface ThymeleafConfigurationFactory { + TemplateEngine getTemplateEngine(); +} diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java new file mode 100644 index 0000000000..377bcfb6ba --- /dev/null +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java @@ -0,0 +1,40 @@ +package org.glassfish.jersey.server.mvc.thymeleaf; + +import org.thymeleaf.TemplateEngine; +import org.thymeleaf.messageresolver.IMessageResolver; +import org.thymeleaf.messageresolver.StandardMessageResolver; +import org.thymeleaf.templateresolver.ClassLoaderTemplateResolver; +import org.thymeleaf.templateresolver.ITemplateResolver; + +public class ThymeleafDefaultConfigurationFactory implements ThymeleafConfigurationFactory { + private final TemplateEngine templateEngine; + + public ThymeleafDefaultConfigurationFactory() { + this.templateEngine = initTemplateEngine(); + } + + @Override + public TemplateEngine getTemplateEngine() { + return templateEngine; + } + + private ITemplateResolver getTemplateResolver() { + ClassLoaderTemplateResolver templateResolver = new ClassLoaderTemplateResolver(); + templateResolver.setPrefix("/WEB-INF/templates/"); + templateResolver.setSuffix(".html"); + templateResolver.setTemplateMode("HTML5"); + templateResolver.setCacheTTLMs(3600000L); + return templateResolver; + } + + private TemplateEngine initTemplateEngine() { + TemplateEngine templateEngine = new TemplateEngine(); + templateEngine.setTemplateResolver(getTemplateResolver()); + return templateEngine; + } + + private IMessageResolver getMessageResolver() { + StandardMessageResolver messageResolver = new StandardMessageResolver(); + return messageResolver; + } +} diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java new file mode 100644 index 0000000000..4ede1f14f6 --- /dev/null +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java @@ -0,0 +1,32 @@ +package org.glassfish.jersey.server.mvc.thymeleaf; + +import jakarta.ws.rs.ConstrainedTo; +import jakarta.ws.rs.RuntimeType; +import jakarta.ws.rs.core.Configuration; +import jakarta.ws.rs.core.Feature; +import jakarta.ws.rs.core.FeatureContext; +import org.glassfish.jersey.server.mvc.MvcFeature; + +@ConstrainedTo(RuntimeType.SERVER) +public final class ThymeleafMvcFeature implements Feature { + private static final String SUFFIX = ".thymeleaf"; + public static final String TEMPLATE_BASE_PATH = MvcFeature.TEMPLATE_BASE_PATH + SUFFIX; + public static final String ENCODING = MvcFeature.ENCODING + SUFFIX; + + @Override + public boolean configure(FeatureContext context) { + final Configuration config = context.getConfiguration(); + + if (!config.isRegistered(ThymeleafViewProcessor.class)) { + context.register(ThymeleafViewProcessor.class); + + // MvcFeature. + if (!config.isRegistered(MvcFeature.class)) { + context.register(MvcFeature.class); + } + + return true; + } + return false; + } +} diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java new file mode 100644 index 0000000000..736b803ab1 --- /dev/null +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java @@ -0,0 +1,17 @@ +package org.glassfish.jersey.server.mvc.thymeleaf; + +import org.thymeleaf.TemplateEngine; + +public class ThymeleafSuppliedConfigurationFactory implements ThymeleafConfigurationFactory { + private final ThymeleafConfigurationFactory configurationFactory; + + public ThymeleafSuppliedConfigurationFactory(ThymeleafConfigurationFactory configurationFactory) { + this.configurationFactory = configurationFactory; + } + + @Override + public TemplateEngine getTemplateEngine() { + return configurationFactory.getTemplateEngine(); + } + +} diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java new file mode 100644 index 0000000000..9d61955848 --- /dev/null +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java @@ -0,0 +1,75 @@ +package org.glassfish.jersey.server.mvc.thymeleaf; + +import jakarta.inject.Inject; +import jakarta.servlet.ServletContext; +import jakarta.ws.rs.core.Configuration; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import org.glassfish.jersey.internal.inject.InjectionManager; +import org.glassfish.jersey.internal.util.collection.Values; +import org.glassfish.jersey.server.mvc.Viewable; +import org.glassfish.jersey.server.mvc.spi.AbstractTemplateProcessor; +import org.thymeleaf.TemplateEngine; +import org.thymeleaf.context.Context; + +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.Reader; +import java.io.Writer; +import java.nio.charset.Charset; +import java.util.Locale; +import java.util.Map; + +public final class ThymeleafViewProcessor extends AbstractTemplateProcessor { + private final ThymeleafConfigurationFactory factory; + + @Inject + public ThymeleafViewProcessor(Configuration config, InjectionManager injectionManager) { + super(config, injectionManager.getInstance(ServletContext.class), "thymeleaf", "html"); + this.factory = getTemplateObjectFactory(injectionManager::createAndInitialize, ThymeleafConfigurationFactory.class, + () -> { + ThymeleafConfigurationFactory configuration = + getTemplateObjectFactory(injectionManager::createAndInitialize, ThymeleafConfigurationFactory.class, Values.empty()); + if (configuration == null) { + return new ThymeleafDefaultConfigurationFactory(); + } else { + return new ThymeleafSuppliedConfigurationFactory(configuration); + } + }); + } + + @Override + protected TemplateEngine resolve(final String templatePath, final Reader reader) throws Exception { + return factory.getTemplateEngine(); + } + + @Override + public void writeTo(final TemplateEngine templateEngine, final Viewable viewable, final MediaType mediaType, + final MultivaluedMap httpHeaders, final OutputStream out) throws IOException { + Context context = new Context(); + + Object model = viewable.getModel(); + if (!(model instanceof Map)) { + context.setVariable("model", viewable.getModel()); + } else { + context.setVariables((Map)viewable.getModel()); + } + + if (context.containsVariable("lang")) { + Object langValue = context.getVariable("lang"); + if (langValue instanceof Locale) { + context.setLocale((Locale) langValue); + } else if (langValue instanceof String) { + Locale locale = Locale.forLanguageTag((String)langValue); + context.setLocale(locale); + } + } + + Charset encoding = setContentType(mediaType, httpHeaders); + + final Writer writer = new BufferedWriter(new OutputStreamWriter(out, encoding)); + templateEngine.process(viewable.getTemplateName(), context, writer); + } +} diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java new file mode 100644 index 0000000000..6ce56c9850 --- /dev/null +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java @@ -0,0 +1 @@ +package org.glassfish.jersey.server.mvc.thymeleaf; \ No newline at end of file diff --git a/ext/pom.xml b/ext/pom.xml index b9047ae1d0..a13a88e730 100644 --- a/ext/pom.xml +++ b/ext/pom.xml @@ -50,6 +50,7 @@ mvc-freemarker mvc-jsp mvc-mustache + mvc-thymeleaf proxy-client rx spring6 diff --git a/pom.xml b/pom.xml index 709a35edee..bc6c11a791 100644 --- a/pom.xml +++ b/pom.xml @@ -142,6 +142,9 @@ Stepan Vavra + + Dmytro Dovnar + @@ -2292,6 +2295,7 @@ 6.0.18 7.9.0 6.9.13.6 + 3.1.2.RELEASE 4.0.3.Final 3.1.9.Final From 309e6e200af6f43ccb3b1abc85f7bd81f79bc2dd Mon Sep 17 00:00:00 2001 From: Dmitriy Dovnar Date: Wed, 24 Apr 2024 10:59:31 +0300 Subject: [PATCH 2/6] add config parameters for settings Thymeleaf TemplateEngine --- .../ThymeleafConfigurationFactory.java | 16 ++++ .../ThymeleafDefaultConfigurationFactory.java | 76 +++++++++++++++++-- .../mvc/thymeleaf/ThymeleafMvcFeature.java | 24 +++++- ...ThymeleafSuppliedConfigurationFactory.java | 28 +++++++ .../mvc/thymeleaf/ThymeleafViewProcessor.java | 29 ++++++- .../server/mvc/thymeleaf/package-info.java | 16 ++++ 6 files changed, 182 insertions(+), 7 deletions(-) diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java index 466fe377f9..deaf8d13ee 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + package org.glassfish.jersey.server.mvc.thymeleaf; import org.thymeleaf.TemplateEngine; diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java index 377bcfb6ba..deb14581c5 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java @@ -1,15 +1,49 @@ +/* + * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + package org.glassfish.jersey.server.mvc.thymeleaf; +import jakarta.ws.rs.core.Configuration; +import org.glassfish.jersey.internal.util.PropertiesHelper; import org.thymeleaf.TemplateEngine; import org.thymeleaf.messageresolver.IMessageResolver; import org.thymeleaf.messageresolver.StandardMessageResolver; import org.thymeleaf.templateresolver.ClassLoaderTemplateResolver; import org.thymeleaf.templateresolver.ITemplateResolver; +import java.util.Map; + +/** + * Handy {@link ThymeleafConfigurationFactory} that supplies a minimally + * configured {@link org.thymeleaf.TemplateEngine } able to + * render Thymeleaf templates. + * The recommended method to provide custom Thymeleaf engine settings is to + * sub-class this class, further customize the + * {@link org.thymeleaf.TemplateEngine settings} as desired in that + * class, and then register the sub-class with the {@link ThymeleafMvcFeature} + * TEMPLATE_OBJECT_FACTORY property. + * + * @author Dmytro Dovnar (dimonmc@gmail.com) + */ public class ThymeleafDefaultConfigurationFactory implements ThymeleafConfigurationFactory { + private final Configuration config; private final TemplateEngine templateEngine; - public ThymeleafDefaultConfigurationFactory() { + public ThymeleafDefaultConfigurationFactory(Configuration config) { + this.config = config; this.templateEngine = initTemplateEngine(); } @@ -19,11 +53,43 @@ public TemplateEngine getTemplateEngine() { } private ITemplateResolver getTemplateResolver() { + Map properties = config.getProperties(); + String basePath = (String) PropertiesHelper.getValue(properties, + "jersey.config.server.mvc.templateBasePath" + ThymeleafMvcFeature.SUFFIX, + String.class, (Map)null); + if (basePath == null) { + basePath = (String)PropertiesHelper.getValue(properties, + "jersey.config.server.mvc.templateBasePath", "", (Map)null); + } + + if (basePath != null && !basePath.startsWith("/")) { + basePath = "/" + basePath; + } + + String templateFileSuffix = (String) PropertiesHelper.getValue(properties, + "jersey.config.server.mvc.templateFileSuffix" + ThymeleafMvcFeature.SUFFIX, + ".html", (Map)null); + + String templateFileMode = (String) PropertiesHelper.getValue(properties, + "jersey.config.server.mvc.templateMode" + ThymeleafMvcFeature.SUFFIX, + "HTML5", (Map)null); + + Boolean cacheEnabled = (Boolean)PropertiesHelper.getValue(properties, + "jersey.config.server.mvc.caching" + ThymeleafMvcFeature.SUFFIX, Boolean.class, (Map)null); + if (cacheEnabled == null) { + cacheEnabled = (Boolean)PropertiesHelper.getValue(properties, + "jersey.config.server.mvc.caching", false, (Map)null); + } + + Long cacheLiveMs = (Long)PropertiesHelper.getValue(properties, + "jersey.config.server.mvc.cacheTTLMs" + ThymeleafMvcFeature.SUFFIX, 3600000L, (Map)null); + ClassLoaderTemplateResolver templateResolver = new ClassLoaderTemplateResolver(); - templateResolver.setPrefix("/WEB-INF/templates/"); - templateResolver.setSuffix(".html"); - templateResolver.setTemplateMode("HTML5"); - templateResolver.setCacheTTLMs(3600000L); + templateResolver.setPrefix(basePath); + templateResolver.setSuffix(templateFileSuffix); + templateResolver.setTemplateMode(templateFileMode); + templateResolver.setCacheTTLMs(cacheLiveMs); + templateResolver.setCacheable(cacheEnabled); return templateResolver; } diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java index 4ede1f14f6..3400a349fd 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + package org.glassfish.jersey.server.mvc.thymeleaf; import jakarta.ws.rs.ConstrainedTo; @@ -9,10 +25,16 @@ @ConstrainedTo(RuntimeType.SERVER) public final class ThymeleafMvcFeature implements Feature { - private static final String SUFFIX = ".thymeleaf"; + public static final String SUFFIX = ".thymeleaf"; public static final String TEMPLATE_BASE_PATH = MvcFeature.TEMPLATE_BASE_PATH + SUFFIX; + public static final String CACHE_TEMPLATES = MvcFeature.CACHE_TEMPLATES + SUFFIX; + public static final String TEMPLATE_OBJECT_FACTORY = MvcFeature.TEMPLATE_OBJECT_FACTORY + SUFFIX; public static final String ENCODING = MvcFeature.ENCODING + SUFFIX; + public static final String TEMPLATE_FILE_SUFFIX = "jersey.config.server.mvc.templateFileSuffix" + SUFFIX; + public static final String TEMPLATE_MODE = "jersey.config.server.mvc.templateMode" + SUFFIX; + public static final String CACHE_TTLMS = "jersey.config.server.mvc.cacheTTLMs" + SUFFIX; + @Override public boolean configure(FeatureContext context) { final Configuration config = context.getConfiguration(); diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java index 736b803ab1..959f11b20b 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java @@ -1,7 +1,35 @@ +/* + * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + package org.glassfish.jersey.server.mvc.thymeleaf; import org.thymeleaf.TemplateEngine; +/** + * {@link ThymeleafConfigurationFactory} that supplies an unchanged + * {@link ThymeleafConfigurationFactory Configuration} as passed-in to + * the constructor. + *

+ * Used to support backwards-compatibility in {@link ThymeleafViewProcessor} + * to wrap directly-configured {@link org.thymeleaf.TemplateEngine} + * objects instead of the recommended {@link ThymeleafDefaultConfigurationFactory} + * or a sub-class thereof. + * + * @author Dmytro Dovnar (dimonmc@gmail.com) + */ public class ThymeleafSuppliedConfigurationFactory implements ThymeleafConfigurationFactory { private final ThymeleafConfigurationFactory configurationFactory; diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java index 9d61955848..bf87e08d96 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + package org.glassfish.jersey.server.mvc.thymeleaf; import jakarta.inject.Inject; @@ -22,9 +38,20 @@ import java.util.Locale; import java.util.Map; +/** + * {@link org.glassfish.jersey.server.mvc.spi.TemplateProcessor Template processor} providing support for Thymeleaf templates. + * + * @author Dmytro Dovnar (dimonmc@gmail.com) + */ public final class ThymeleafViewProcessor extends AbstractTemplateProcessor { private final ThymeleafConfigurationFactory factory; + /** + * Create an instance of this processor with injected {@link jakarta.ws.rs.core.Configuration config}. + * + * @param config config to configure this processor from. + * @param injectionManager injection manager. + */ @Inject public ThymeleafViewProcessor(Configuration config, InjectionManager injectionManager) { super(config, injectionManager.getInstance(ServletContext.class), "thymeleaf", "html"); @@ -33,7 +60,7 @@ public ThymeleafViewProcessor(Configuration config, InjectionManager injectionMa ThymeleafConfigurationFactory configuration = getTemplateObjectFactory(injectionManager::createAndInitialize, ThymeleafConfigurationFactory.class, Values.empty()); if (configuration == null) { - return new ThymeleafDefaultConfigurationFactory(); + return new ThymeleafDefaultConfigurationFactory(config); } else { return new ThymeleafSuppliedConfigurationFactory(configuration); } diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java index 6ce56c9850..504b7fd975 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java @@ -1 +1,17 @@ +/* + * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + package org.glassfish.jersey.server.mvc.thymeleaf; \ No newline at end of file From cd7ccf4e0c5f80899a7b2a96fa33e177728a1063 Mon Sep 17 00:00:00 2001 From: Dmytro Dovnar Date: Thu, 25 Apr 2024 14:21:04 +0300 Subject: [PATCH 3/6] mvc-thymeleaf extension: update copyright year --- .../server/mvc/thymeleaf/ThymeleafConfigurationFactory.java | 2 +- .../mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java | 2 +- .../jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java | 2 +- .../mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java | 2 +- .../jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java | 2 +- .../org/glassfish/jersey/server/mvc/thymeleaf/package-info.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java index deaf8d13ee..fb62166c4c 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java index deb14581c5..45ad4c67bf 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java index 3400a349fd..b2b3746527 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java index 959f11b20b..485be93999 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java index bf87e08d96..f040a174cb 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java index 504b7fd975..1698e6249d 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at From 549da4a35d63d033407bb3632a474bec2d2f5b2e Mon Sep 17 00:00:00 2001 From: Dmytro Dovnar Date: Thu, 25 Apr 2024 15:56:25 +0300 Subject: [PATCH 4/6] mvc-thymeleaf extension: fix stylechecks --- .../ThymeleafDefaultConfigurationFactory.java | 22 +++++++++---------- .../mvc/thymeleaf/ThymeleafViewProcessor.java | 8 ++++--- .../server/mvc/thymeleaf/package-info.java | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java index 45ad4c67bf..7ed81da61f 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java @@ -56,10 +56,10 @@ private ITemplateResolver getTemplateResolver() { Map properties = config.getProperties(); String basePath = (String) PropertiesHelper.getValue(properties, "jersey.config.server.mvc.templateBasePath" + ThymeleafMvcFeature.SUFFIX, - String.class, (Map)null); + String.class, (Map) null); if (basePath == null) { - basePath = (String)PropertiesHelper.getValue(properties, - "jersey.config.server.mvc.templateBasePath", "", (Map)null); + basePath = (String) PropertiesHelper.getValue(properties, + "jersey.config.server.mvc.templateBasePath", "", (Map) null); } if (basePath != null && !basePath.startsWith("/")) { @@ -68,21 +68,21 @@ private ITemplateResolver getTemplateResolver() { String templateFileSuffix = (String) PropertiesHelper.getValue(properties, "jersey.config.server.mvc.templateFileSuffix" + ThymeleafMvcFeature.SUFFIX, - ".html", (Map)null); + ".html", (Map) null); String templateFileMode = (String) PropertiesHelper.getValue(properties, "jersey.config.server.mvc.templateMode" + ThymeleafMvcFeature.SUFFIX, - "HTML5", (Map)null); + "HTML5", (Map) null); - Boolean cacheEnabled = (Boolean)PropertiesHelper.getValue(properties, - "jersey.config.server.mvc.caching" + ThymeleafMvcFeature.SUFFIX, Boolean.class, (Map)null); + Boolean cacheEnabled = (Boolean) PropertiesHelper.getValue(properties, + "jersey.config.server.mvc.caching" + ThymeleafMvcFeature.SUFFIX, Boolean.class, (Map) null); if (cacheEnabled == null) { - cacheEnabled = (Boolean)PropertiesHelper.getValue(properties, - "jersey.config.server.mvc.caching", false, (Map)null); + cacheEnabled = (Boolean) PropertiesHelper.getValue(properties, + "jersey.config.server.mvc.caching", false, (Map) null); } - Long cacheLiveMs = (Long)PropertiesHelper.getValue(properties, - "jersey.config.server.mvc.cacheTTLMs" + ThymeleafMvcFeature.SUFFIX, 3600000L, (Map)null); + Long cacheLiveMs = (Long) PropertiesHelper.getValue(properties, + "jersey.config.server.mvc.cacheTTLMs" + ThymeleafMvcFeature.SUFFIX, 3600000L, (Map) null); ClassLoaderTemplateResolver templateResolver = new ClassLoaderTemplateResolver(); templateResolver.setPrefix(basePath); diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java index f040a174cb..7057f65732 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java @@ -58,7 +58,9 @@ public ThymeleafViewProcessor(Configuration config, InjectionManager injectionMa this.factory = getTemplateObjectFactory(injectionManager::createAndInitialize, ThymeleafConfigurationFactory.class, () -> { ThymeleafConfigurationFactory configuration = - getTemplateObjectFactory(injectionManager::createAndInitialize, ThymeleafConfigurationFactory.class, Values.empty()); + getTemplateObjectFactory( + injectionManager::createAndInitialize, + ThymeleafConfigurationFactory.class, Values.empty()); if (configuration == null) { return new ThymeleafDefaultConfigurationFactory(config); } else { @@ -81,7 +83,7 @@ public void writeTo(final TemplateEngine templateEngine, final Viewable viewable if (!(model instanceof Map)) { context.setVariable("model", viewable.getModel()); } else { - context.setVariables((Map)viewable.getModel()); + context.setVariables((Map) viewable.getModel()); } if (context.containsVariable("lang")) { @@ -89,7 +91,7 @@ public void writeTo(final TemplateEngine templateEngine, final Viewable viewable if (langValue instanceof Locale) { context.setLocale((Locale) langValue); } else if (langValue instanceof String) { - Locale locale = Locale.forLanguageTag((String)langValue); + Locale locale = Locale.forLanguageTag((String) langValue); context.setLocale(locale); } } diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java index 1698e6249d..70ffbfd0f4 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java @@ -14,4 +14,4 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 */ -package org.glassfish.jersey.server.mvc.thymeleaf; \ No newline at end of file +package org.glassfish.jersey.server.mvc.thymeleaf; From fb5d76a10fdb478b170ec3faa696d244b8923049 Mon Sep 17 00:00:00 2001 From: Dmytro Dovnar Date: Thu, 25 Apr 2024 16:29:57 +0300 Subject: [PATCH 5/6] mvc-thymeleaf extension: copyrights --- .../server/mvc/thymeleaf/ThymeleafConfigurationFactory.java | 2 +- .../mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java | 2 +- .../jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java | 2 +- .../mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java | 2 +- .../jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java | 2 +- .../org/glassfish/jersey/server/mvc/thymeleaf/package-info.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java index fb62166c4c..aba4aac990 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafConfigurationFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java index 7ed81da61f..588c47542b 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafDefaultConfigurationFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java index b2b3746527..b43b9a6b48 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafMvcFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java index 485be93999..4f21ce1cb6 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafSuppliedConfigurationFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java index 7057f65732..fc8139c65b 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/ThymeleafViewProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at diff --git a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java index 70ffbfd0f4..d8cd7ae4a9 100644 --- a/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java +++ b/ext/mvc-thymeleaf/src/main/java/org/glassfish/jersey/server/mvc/thymeleaf/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at From fb561e8887fcec170d72201d4ea81a4ba45a1217 Mon Sep 17 00:00:00 2001 From: Dmytro Dovnar Date: Thu, 25 Apr 2024 17:04:54 +0300 Subject: [PATCH 6/6] mvc-thymeleaf extension: fix copyrights --- ext/mvc-thymeleaf/pom.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ext/mvc-thymeleaf/pom.xml b/ext/mvc-thymeleaf/pom.xml index 0f2740f6bd..db531b0a1b 100644 --- a/ext/mvc-thymeleaf/pom.xml +++ b/ext/mvc-thymeleaf/pom.xml @@ -1,4 +1,22 @@ + +