I maintain some internal documentation that refers to Spring Framework reference documentation pages, based on the version of Spring Framework that we use.

Before the Spring Framework documentation was converted to Antora, these links included the full Spring Framework version number, e.g.: https://docs.spring.io/spring-framework/docs/6.0.14/reference/html/core.html#beans-postconstruct-and-predestroy-annotations

This link still works, but now redirects to https://docs.spring.io/spring-framework/reference/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html, which shows the documentation for the current latest release (currently version 6.1.2), which may not be applicable to the version we're currently using.

I see that via the three dots in the upper left corner, I can switch to the reference documentation for another version, but it seems that only the latest patch release and SNAPSHOT version per minor version are available. For instance https://docs.spring.io/spring-framework/reference/6.0/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html is available, but that currently displays the documentation for 6.0.15. I assume this is because that is currently the latest 6.0.x. release. Using the full version in the URL doesn't work: https://docs.spring.io/spring-framework/reference/6.0.15/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html can't be found.

  • Is reference documentation intentionally no longer published for each Spring Framework release, but only for the latest patch and SNAPSHOT versions for each minor version?
  • If reference documentation is indeed only available per minor version, could redirects be set up so that for instance https://docs.spring.io/spring-framework/reference/6.0.15/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html would redirect to https://docs.spring.io/spring-framework/reference/6.0/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html? If not, I guess I'll need to truncate the version that we use for link generation to be able to generate a link like https://docs.spring.io/spring-framework/reference/6.0/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html for Spring Framework 6.0.15.

Comment From: snicoll

Is reference documentation intentionally no longer published for each Spring Framework release, but only for the latest patch and SNAPSHOT versions for each minor version?

Yes.

If reference documentation is indeed only available per minor version, could redirects be set up so that for instance https://docs.spring.io/spring-framework/reference/6.0.15/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html would redirect to https://docs.spring.io/spring-framework/reference/6.0/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html?

I believe that not having those around was done on purpose to improve the SEO. I can't provide the exact reason but @sdeleuze or @rwinch should be able to.

Comment From: breun

If https://docs.spring.io/spring-framework/reference/6.0.15/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html would redirect to https://docs.spring.io/spring-framework/reference/6.0/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html, then wouldn't search engines only index https://docs.spring.io/spring-framework/reference/6.0/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html? I don't think that the existence of such a redirect would impact search engine ranking.

Comment From: sdeleuze

Historically, the SEO of Spring Framework reference documentation has been pretty bad, one reason being the page rank being diluted across so many patch versions. What we want moving forward is concentrating the page rank to the latest stable version with a version-less URL(https://docs.spring.io/spring-framework/reference/).

Without doing something special, I tend to think that redirecting to 6.0 would dilute the page rank and increase the duplication, but we have canonical links in the generated HTML like <link rel="canonical" href="https://docs.spring.io/spring-framework/reference/index.html"> in https://docs.spring.io/spring-framework/reference/6.0/index.html, so we should be good.

So I think I would be in favor of such "patch version URL" to "minor version URL" redirect, if that's not too painful to manage at infrastructure level.

Comment From: breun

The old documentation also lacked a way to switch to the documentation for another version, except by editing the URL directly (which I did do often). That's better with the new documentation, although it still took me a while to find this feature under the ... icon.

We would appreciate a "patch version URL" to "minor version URL" redirect, so we can keep generating links to a specific Spring Framework version easily.

Comment From: manjunath-dalavaye

This are solution :- 1.Implement redirects: Create redirects from specific release version links to the appropriate minor version documentation using Antora's redirect mechanisms. 2.Truncate version for links: If redirects are not feasible, modify link generation logic to truncate the version to the minor level, ensuring links point to the intended documentation.

Comment From: sdeleuze

Redirects are now in place to redirect links with patch release to the corresponding minor release URL, for example https://docs.spring.io/spring-framework/reference/6.0.15/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html now redirects to https://docs.spring.io/spring-framework/reference/6.0/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html.

We have also updated redirects for old documentation like https://docs.spring.io/spring-framework/docs/6.0.14/reference/html/core.html#beans-postconstruct-and-predestroy-annotations to redirect to https://docs.spring.io/spring-framework/reference/6.0/core/beans/annotation-config/postconstruct-and-predestroy-annotations.html instead of latest (6.1).