Skip to content

Commit

Permalink
Upgrade to thymeleaf for spring 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Tara Drwenski committed Aug 19, 2024
1 parent 293953d commit 57e2604
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tds-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ dependencies {
// tds
api 'org.json:json:20231013'
api 'com.coverity.security:coverity-escapers:1.1.1'
api 'org.thymeleaf:thymeleaf-spring5:3.1.2.RELEASE'
api 'org.thymeleaf:thymeleaf-spring6:3.1.2.RELEASE'
api 'jakarta.validation:jakarta.validation-api'
api "org.hibernate.validator:hibernate-validator:${depVersion.hibernateValidator}"
api "org.hibernate.validator:hibernate-validator-annotation-processor:${depVersion.hibernateValidator}"
Expand Down
2 changes: 1 addition & 1 deletion tds/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ dependencies {
// @Resource annotation (removed post Java 8)
implementation 'jakarta.annotation:jakarta.annotation-api'

implementation 'org.thymeleaf:thymeleaf-spring5'
implementation 'org.thymeleaf:thymeleaf-spring6'

// Testing
testImplementation "jakarta.servlet:jakarta.servlet-api:${depVersion.jakartaServletApi}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.thymeleaf.IEngineConfiguration;
import org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver;
import org.thymeleaf.spring6.templateresolver.SpringResourceTemplateResolver;
import org.thymeleaf.templateresource.FileTemplateResource;
import org.thymeleaf.templateresource.ITemplateResource;
import org.thymeleaf.util.StringUtils;
Expand Down
6 changes: 3 additions & 3 deletions tds/src/main/webapp/WEB-INF/spring-servlet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<property name="characterEncoding" value="UTF-8"/>
</bean>

<bean id="defaultTemplateResolver" class="org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver">
<bean id="defaultTemplateResolver" class="org.thymeleaf.spring6.templateresolver.SpringResourceTemplateResolver">
<property name="prefix" value="/WEB-INF/"/>
<property name="suffix" value=".html"/>
<property name="templateMode" value="HTML"/>
Expand All @@ -40,7 +40,7 @@
<property name="characterEncoding" value="UTF-8"/>
</bean>

<bean id="templateEngine" class="org.thymeleaf.spring5.SpringTemplateEngine">
<bean id="templateEngine" class="org.thymeleaf.spring6.SpringTemplateEngine">
<property name="templateResolvers">
<set>
<ref bean="customTemplateResolver"/>
Expand All @@ -49,7 +49,7 @@
</property>
</bean>

<bean class="org.thymeleaf.spring5.view.ThymeleafViewResolver">
<bean class="org.thymeleaf.spring6.view.ThymeleafViewResolver">
<property name="templateEngine" ref="templateEngine"/>
<property name="order" value="2"/>
<property name="viewNames" value="templates/*"/>
Expand Down

0 comments on commit 57e2604

Please sign in to comment.