-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Fix links to Servlet and JPA javadoc #43320
Fix links to Servlet and JPA javadoc #43320
Conversation
Thanks very much, @ngocnhan-tran1996. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small refactor in url patterns
@@ -763,7 +763,7 @@ bom { | |||
links { | |||
site(version -> "https://jakarta.ee/specifications/persistence/%s.%s" | |||
.formatted(version.major(), version.minor())) | |||
javadoc(version -> "https://jakarta.ee/specifications/persistence/%s.%s/apidocs" | |||
javadoc(version -> "https://jakarta.ee/specifications/persistence/%s.%s/apidocs/jakarta.persistence" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of appending "jakarta.persistence" to the url, here you could leverage the third argument to .formatted(...) and use:
"https://jakarta.ee/specifications/persistence/%s.%s/apidocs/%s".formatted(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments, but this PR has already been merged. I also think the changes are better as they are now. Nothing's being appended and jakarta.persistence
is an unchanging part of the string so there's no benefit in it being a format argument.
@@ -782,7 +782,7 @@ bom { | |||
links { | |||
site(version -> "https://jakarta.ee/specifications/servlet/%s.%s" | |||
.formatted(version.major(), version.minor())) | |||
javadoc(version -> "https://jakarta.ee/specifications/servlet/%s.%s/apidocs" | |||
javadoc(version -> "https://jakarta.ee/specifications/servlet/%s.%s/apidocs/jakarta.servlet" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of appending "jakarta.persistence" to the url, here you could leverage the third argument to .formatted(...) and use:
"https://jakarta.ee/specifications/servlet/%s.%s/apidocs/%s".formatted(...)
Reference javadoc links go to 404 page
Reference
https://docs.spring.io/spring-boot/reference/web/servlet.html#web.servlet.embedded-container.servlets-filters-listeners.beans
Reference
https://docs.spring.io/spring-boot/how-to/data-access.html#howto.data-access.spring-data-repositories