diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index 69fb5da90c..b1e073eff0 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -58,12 +58,14 @@ task javadoc(type: Javadoc) { } doFirst { def versionConstraints = dependencyVersions.versionConstraints + def tomcatVersion = "${versionConstraints['org.apache.tomcat:tomcat-annotations-api']}" + def tomcatDocsVersion = tomcatVersion.substring(0, tomcatVersion.lastIndexOf('.')); options.links = [ 'https://docs.oracle.com/javase/8/docs/api/', 'https://docs.oracle.com/javaee/7/api/', "https://docs.spring.io/spring-framework/docs/${versionConstraints['org.springframework:spring-core']}/javadoc-api/", "https://docs.spring.io/spring-security/site/docs/${versionConstraints['org.springframework.security:spring-security-core']}/api/", - 'https://tomcat.apache.org/tomcat-9.0-doc/api/', + "https://tomcat.apache.org/tomcat-${tomcatDocsVersion}-doc/api/", "https://www.eclipse.org/jetty/javadoc/${versionConstraints['org.eclipse.jetty:jetty-server']}/", "https://www.thymeleaf.org/apidocs/thymeleaf/${versionConstraints['org.thymeleaf:thymeleaf']}/" ] as String[]