-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Docs: Clarify default prefix/suffix of registry.jsp()
#35430
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
Docs: Clarify default prefix/suffix of registry.jsp()
#35430
Conversation
...ttpRequest This pull request fixes a grammatical mistake in the JavaDoc of the setResponse method in MockClientHttpRequest. - Original: "the this request" - Changed to: "this request" This change improves the clarity and quality of the documentation. Signed-off-by: DongNyoung Lee <121621378+Dongnyoung@users.noreply.github.com>
Fix grammatical error in JavaDoc of setResponse method in MockClientHttpRequest.
Signed-off-by: DongNyoung Lee <121621378+Dongnyoung@users.noreply.github.com>
I think this is already covered in the Javadocs: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/config/annotation/ViewResolverRegistry.html#jsp()
I understand this is already covered in the Javadoc, thanks for pointing it out.
Would it still make sense to keep a short [NOTE] or at least a cross-reference in the reference docs?
While the defaults can indeed be found in the Javadoc, a brief mention in the documentation could make it easier for readers to quickly grasp the behavior without having to jump into the API docs.
Happy to adjust the PR accordingly if you think it adds value.
@Dongnyoung I don't think this is the right place for documenting such details, but I would suggest to rework your PR as an update of https://docs.spring.io/spring-framework/reference/web/webmvc-view/mvc-jsp.html to replace the XML bean declaration by a more high level JavaConfig configureViewResolvers(ViewResolverRegistry registry)
code snippet displayed by default and a complementary <mvc:view-resolvers>
XML one with a related note.
Thanks a lot for the valuable feedback 🙏
I’ve reworked this change according to your suggestions (JavaConfig example as the default, XML <mvc:view-resolvers>
as a note, and no duplication of defaults).
Opened a new PR at #35444 with the updated version.
Hello,
This PR clarifies the Spring MVC documentation for View Resolvers.
The current example shows
registry.jsp();
but does not explain what defaults are applied.In this file: https://github.com/spring-projects/spring-framework/blob/main/framework-docs/modules/ROOT/pages/web/webmvc/mvc-config/view-resolvers.adoc
Problem
registry.jsp()
registers anInternalResourceViewResolver
with sensible defaults.Changes Introduced
[NOTE]
block immediately after the JSP example./WEB-INF/
.jsp
application.properties
example was intentionally omitted here, since it is more relevant to Spring Boot documentation.Closes #35429
Thank you for reviewing.