Skip to content

WebMvcTest and WebFluxTest ignore user-provided Thymeleaf IDialect beans #24149

Closed
@jnizet

Description

@jnizet

Beans implementing Thymeleaf's IDialect interface are automatically registered by Spring Boot as dialects for Thymeleaf templates.
But this doesn't happen in WebMvcTests, where IDialect beans are not included. It seems to me that they belong to the web MVC layer, and should thus be added to the WebMvcTest slice.

The workaround is of course easy enough:

@Import(MyCustomDialect.class)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions