-
Notifications
You must be signed in to change notification settings - Fork 41.2k
WebMvcTest and WebFluxTest ignore user-provided Thymeleaf IDialect beans #24149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks, @jnizet. This feels like a bug to me. It doesn't really make sense to include an auto-configuration while excluding user-provided beans that it would normally consume. |
Hi @wilkinsona is this bug available to work , I would be interested to work on it. |
@sadath42 Thanks for the offer. A contribution that fixes this would be much appreciated. Please let us know if you have any questions. |
@wilkinsona No questions as if now. I am analyzing the bug if there any questions will let you know . |
How's it going, @sadath42? It's been a while now. If you no longer have time to work on a fix, please just let us know and we can take care of it. Equally, please let us know if you have any questions. |
Hi , |
Sorry for thread necromancy. Is there a nice way to achieve the "old" behavior, i.e. exclude custom dialects from the EDIT: To clarify the usecase, suppose you have a bunch of |
Yes, an exclude filter would be the best way to filter out unwanted beans found via component scanning. |
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:
The text was updated successfully, but these errors were encountered: