-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Remove use of reflection in MustacheViewResolver #32030
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
Conversation
Thanks for the PR.
Have you tried the smoke test against your change? |
There was a style error which failed the validation (apparently they are slightly different then the Spring Framework ones). I ran |
Prior to this commit the MustacheViewResolver used reflection to instantiate a MustacheView class, which fails when using AOT. Creating the view without reflection (analogous to the FreemarkerViewResolver) will fix this without the need for additional constructor hints. Fixes: spring-projects#32028
Sorry, that wasn't my question. You've mentioned that it fixes #32028 so I am asking if you've tested https://github.com/spring-projects/spring-aot-smoke-tests/tree/main/mustache-webmvc with that change. |
Tried to run it but it downloads the dependencies from the SNAPSHOT repository so it still has the old code and obviously it fails the tests. How can I run the test (it should be the As this commit removes the reflection and replaces it with a regular |
Thanks for the reply and for trying out the sample. You can run the smoke test with Gradle's |
Thanks for the hint. Just ran the tests and I have a successful build with the change. |
Prior to this commit the MustacheViewResolver used reflection to instantiate a MustacheView class, which fails when using AOT. Creating the view without reflection (analogous to the FreemarkerViewResolver) will fix this without the need for additional constructor hints. See gh-32030
Prior to this commit the MustacheViewResolver used reflection
to instantiate a MustacheView class, which fails when using AOT.
Creating the view without reflection (analogous to the
FreemarkerViewResolver) will fix this without the need for additional
constructor hints.
Fixes: #32028