Skip to content
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

ScriptTemplateView should check template resource [SPR-14729] #19294

Closed
spring-projects-issues opened this issue Sep 17, 2016 · 2 comments
Closed

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Sep 17, 2016

Brian Clozel opened SPR-14729 and commented

The ScriptTemplateView class does not override the checkResource method. This means that, when configuring multiple template resolvers within an application, the ScriptTemplateViewResolver won't properly check if a template is available before trying to render it, thus throwing an exception.
The next view resolvers in the chain are then never called.


Affects: 4.2.7, 4.3.2, 5.0 M1

Reference URL: https://stackoverflow.com/questions/39547340/mustache-and-internalviewresolvers-spring-mvc

Backported to: 4.2.8

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 18, 2016

Juergen Hoeller commented

Brian Clozel, I've revised this check to avoid exception swallowing (and full template loading) and rather delegate to getResource directly, making the latter return null in case of no resource found. I hope that's in alignment with your original intention here.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 19, 2016

Brian Clozel commented

Thanks Juergen Hoeller!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants