My previous notes described how to do this for Spring 5.
That old approach no longer works for Spring 6.
Instead you can use the following Maven dependencies:
Note the use of the Spring 6
spring-context dependency. This pulls in some additional Spring dependencies, including SpEL (Spring’s expression language), which is used by Thymeleaf’s Spring dialect.
Configuring your Thymeleaf template engine to use the Spring dialect has not changed. See my previous notes for details.