Skip to content

Example of Thymeleaf 3.1 not working well with Spring Data Projections (due to proxy)

Notifications You must be signed in to change notification settings

maxwellt/thymeleaf31-projection-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Thymeleaf 3.1 release states the following:

Thymeleaf 3.1 establishes a general restriction on the use of classes from core packages: java., javax., jakarta., jdk., org.ietf.jgss., org.omg., org.w3c.dom., org.xml.sax., com.sun.* and sun.*.

If you are using Spring Data Projections, the returned class will always be a proxy in the jdk.* package, which means you aren't able to use it in a Thymeleaf template.

I have added as simple an example as I could think of to demonstrate the issue. Simply run ./mvnw spring-boot:run and navigate to localhost:8080 and the console output will show the error.

About

Example of Thymeleaf 3.1 not working well with Spring Data Projections (due to proxy)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published