From 34e55468f5b09d346909b86e938a01a29abf27fc Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 20 Mar 2023 10:53:17 +0100 Subject: [PATCH] Fix broken links in reference documentation. Closes #1345 --- src/main/asciidoc/index.adoc | 5 +-- src/main/asciidoc/preface.adoc | 35 +++++++++---------- .../reference/cassandra-repositories.adoc | 4 +-- src/main/asciidoc/reference/cassandra.adoc | 10 +++--- .../reference/exception-translation.adoc | 5 +-- src/main/asciidoc/reference/mapping.adoc | 2 +- .../reactive-cassandra-repositories.adoc | 2 +- .../reference/reactive-cassandra.adoc | 12 +++---- 8 files changed, 38 insertions(+), 37 deletions(-) diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc index 948536483..bd52bb0fc 100644 --- a/src/main/asciidoc/index.adoc +++ b/src/main/asciidoc/index.adoc @@ -7,14 +7,15 @@ ifdef::backend-epub3[:front-cover-image: image:epub-cover.png[Front Cover,1050,1 :example-root: ../../../spring-data-cassandra/src/test/java/org/springframework/data/cassandra/example :example-resources: ../../../spring-data-cassandra/src/test/resources/org/springframework/data/cassandra/example :tabsize: 2 -:spring-framework-docs: https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/ -(C) 2008-2022 The original author(s). +(C) 2008-2023 The original author(s). NOTE: Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically. include::preface.adoc[] + include::{spring-data-commons-docs}/dependencies.adoc[leveloffset=+1] + include::{spring-data-commons-docs}/repositories.adoc[leveloffset=+1] [[reference]] diff --git a/src/main/asciidoc/preface.adoc b/src/main/asciidoc/preface.adoc index 6b6e8421c..8720c3c5d 100644 --- a/src/main/asciidoc/preface.adoc +++ b/src/main/asciidoc/preface.adoc @@ -3,7 +3,7 @@ The Spring Data for Apache Cassandra project applies core Spring concepts to the development of solutions using the Cassandra Columnar data store. A "`template`" is provided as a high-level abstraction for storing and querying documents. -This project has noticeable similarities to the {spring-framework-docs}data-access.html#jdbc[JDBC support] +This project has noticeable similarities to the {springDocsUrl}data-access.html#jdbc[JDBC support] in the core Spring Framework. This document is the reference guide for Spring Data support for Cassandra. @@ -15,16 +15,16 @@ The rest of the document refers only to Spring Data for Apache Cassandra feature [[get-started:first-steps:spring]] == Knowing Spring -Spring Data uses the Spring Framework's {spring-framework-docs}core.html[core] +Spring Data uses the Spring Framework's {springDocsUrl}core.html[core] functionality, including: -* {spring-framework-docs}core.html#beans[IoC] container -* {spring-framework-docs}core.html#validation[validation, type conversion and data binding] -* {spring-framework-docs}core.html#expressions[expression language] -* {spring-framework-docs}core.html#aop[AOP] -* {spring-framework-docs}integration.html#jmx[JMX integration] -* {spring-framework-docs}data-access.html[DAO support] -* {spring-framework-docs}data-access.html#dao-exceptions[DAO Exception Hierarchy] +* {springDocsUrl}core.html#beans[IoC] container +* {springDocsUrl}core.html#validation[validation, type conversion and data binding] +* {springDocsUrl}core.html#expressions[expression language] +* {springDocsUrl}core.html#aop[AOP] +* {springDocsUrl}integration.html#jmx[JMX integration] +* {springDocsUrl}data-access.html[DAO support] +* {springDocsUrl}data-access.html#dao-exceptions[DAO Exception Hierarchy] While it is not important to know the Spring APIs, understanding the concepts behind them is important. At a minimum, the idea behind IoC should be familiar, no matter what IoC container you choose to use. @@ -33,10 +33,10 @@ The core functionality of the Cassandra support can be used directly, with no ne This is much like `JdbcTemplate`, which can be used 'standalone' without any other services of the Spring container. To use all the features of Spring Data for Apache Cassandra, such as the repository support, you must configure some parts of the library by using Spring. -To learn more about Spring, you can refer to the comprehensive {spring-framework-docs}[documentation] +To learn more about Spring, you can refer to the comprehensive {springDocsUrl}[documentation] that explains the Spring Framework in detail. There are a lot of articles, blog entries, and books on Spring. -See the Spring Framework https://projects.spring.io/spring-framework/[home page] for more information. +See the Spring Framework https://spring.io/projects/spring-framework[home page] for more information. [[get-started:first-steps:nosql]] == Knowing NoSQL and Cassandra @@ -50,9 +50,8 @@ It usually does not take more then 5-10 minutes to go through them, and, if you The starting point for learning about Cassandra is https://cassandra.apache.org/[cassandra.apache.org]. Also, here is a list of other useful resources: -* The https://datastax.com/[DataStax] site offers https://www.datastax.com/what-we-offer/products-services/support[commercial support] -and many resources, including, but not limited to, https://docs.datastax.com/en/landing_page/doc/landing_page/current.html[documentation], -https://docs.datastax.com/en/landing_page/doc/landing_page/current.html[DataStax Academy], a https://www.datastax.com/dev/blog[Tech Blog], and so on. +* The https://datastax.com/[DataStax] site offers https://www.datastax.com/products/datastax-enterprise[commercial support] +and many resources, including, but not limited to, https://docs.datastax.com/en/home/docs/index.html[documentation], and https://docs.datastax.com/en/home/docs/index.html[DataStax Academy]. * The https://academy.datastax.com/resources/ds101-introduction-cassandra[DataStax Academy introduction to Cassandra]. * The https://cassandra.apache.org/doc/latest/getting_started/index.html[Cassandra Quick Start Guide]. @@ -83,7 +82,7 @@ https://pivotal.io/[Pivotal Software, Inc.], the company behind Spring Data and [[get-started:up-to-date]] === Following Development -For information on the Spring Data for Apache Cassandra source code repository, nightly builds, and snapshot artifacts see the https://projects.spring.io/spring-data-cassandra/[Spring Data for Apache Cassandra home page]. +For information on the Spring Data for Apache Cassandra source code repository, nightly builds, and snapshot artifacts see the https://spring.io/projects/spring-data-cassandra[Spring Data for Apache Cassandra home page]. You can help make Spring Data best serve the needs of the Spring community by interacting with developers through the community on https://stackoverflow.com/questions/tagged/spring-data[Stack Overflow]. To follow developer activity, look for the mailing list information on the Spring Data for Apache Cassandra home page. If you encounter a bug or want to suggest an improvement, please create a ticket on the Spring Data issue @@ -96,6 +95,6 @@ Finally, you can follow the Spring https://spring.io/blog[blog] or the project * Version Control: https://github.com/spring-projects/spring-data-cassandra * Bugtracker: https://github.com/spring-projects/spring-data-cassandra/issues -* Release repository: https://repo.spring.io/libs-release -* Milestone repository: https://repo.spring.io/libs-milestone -* Snapshot repository: https://repo.spring.io/libs-snapshot +* Release repository: https://repo1.maven.org/maven2/ +* Milestone repository: https://repo.spring.io/milestone/ +* Snapshot repository: https://repo.spring.io/snapshot/ diff --git a/src/main/asciidoc/reference/cassandra-repositories.adoc b/src/main/asciidoc/reference/cassandra-repositories.adoc index cb217c812..823fc2cb1 100644 --- a/src/main/asciidoc/reference/cassandra-repositories.adoc +++ b/src/main/asciidoc/reference/cassandra-repositories.adoc @@ -328,7 +328,7 @@ public interface PersonRepository extends CrudRepository { ---- ==== -The DataStax Cassandra documentation includes https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlConfigConsistency.html[a good discussion of the available consistency levels]. +The DataStax Cassandra documentation includes https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html[a good discussion of the available consistency levels]. NOTE: You can control fetch size, consistency level, and retry policy defaults by configuring the following parameters on the CQL API instances: `CqlTemplate`, `AsyncCqlTemplate`, and `ReactiveCqlTemplate`. Defaults apply if the particular query option is not set. @@ -338,7 +338,7 @@ Defaults apply if the particular query option is not set. Instances of the repository interfaces are usually created by a container, and the Spring container is the most natural choice when working with Spring Data. Spring Data for Apache Cassandra ships with a custom CDI extension that allows using the repository abstraction in CDI environments. -The extension is part of the JAR. To activate it, drop the Spring Data for Apache Cassandra JAR into your classpath. +The extension is part of the JAR.To activate it, drop the Spring Data for Apache Cassandra JAR into your classpath. You can now set up the infrastructure by implementing a CDI Producer for the `CassandraTemplate`, as the following examlpe shows: diff --git a/src/main/asciidoc/reference/cassandra.adoc b/src/main/asciidoc/reference/cassandra.adoc index 44e929f42..cfbdcafb2 100644 --- a/src/main/asciidoc/reference/cassandra.adoc +++ b/src/main/asciidoc/reference/cassandra.adoc @@ -6,8 +6,8 @@ Spring Data support for Apache Cassandra contains a wide range of features: * Spring configuration support with Java-based `@Configuration` classes or the XML namespace. * The `CqlTemplate` helper class that increases productivity by properly handling common Cassandra data access operations. * The `CassandraTemplate` helper class that provides object mapping between CQL Tables and POJOs. -* Exception translation into Spring's portable {spring-framework-docs}data-access.html#dao-exceptions[Data Access Exception Hierarchy]. -* Feature rich object mapping integrated with _Spring's_ {spring-framework-docs}core.html#core-convert[Conversion Service]. +* Exception translation into Spring's portable {springDocsUrl}data-access.html#dao-exceptions[Data Access Exception Hierarchy]. +* Feature rich object mapping integrated with _Spring's_ {springDocsUrl}core.html#core-convert[Conversion Service]. * Annotation-based mapping metadata that is extensible to support other metadata formats. * Java-based query, criteria, and update DSLs. * Automatic implementation of `Repository` interfaces including support for custom finder methods. @@ -19,7 +19,7 @@ Spring Data for Apache Cassandra uses consistent naming conventions on objects i == Getting Started Spring Data for Apache Cassandra requires Apache Cassandra 2.1 or later and Datastax Java Driver 4.0 or later. -An easy way to quickly set up and bootstrap a working environment is to create a Spring-based project in https://spring.io/tools/sts[STS] or use https://start.spring.io/[Spring Initializer]. +An easy way to quickly set up and bootstrap a working environment is to create a Spring-based project in https://spring.io/tools[Spring Tools] or use https://start.spring.io/[Spring Initializer]. First, you need to set up a running Apache Cassandra server. See the @@ -116,7 +116,7 @@ These are discussed in the following sections. NOTE: For those not familiar with how to configure the Spring container using Java-based bean metadata instead of XML-based metadata, see the high-level introduction in the reference docs https://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/new-in-3.0.html#new-java-configuration[here] -as well as the detailed documentation {spring-framework-docs}core.html#beans-java-instantiating-container[here]. +as well as the detailed documentation {springDocsUrl}core.html#beans-java-instantiating-container[here]. [[cassandra.cassandra-java-config]] === Registering a Session Instance by Using Java-based Metadata @@ -136,7 +136,7 @@ This approach lets you use the standard `com.datastax.oss.driver.api.core.CqlSes An alternative is to register an instance of `com.datastax.oss.driver.api.core.CqlSession` with the container by using Spring's `CqlSessionFactoryBean`. As compared to instantiating a `com.datastax.oss.driver.api.core.CqlSession` instance directly, the `FactoryBean` approach has the added advantage of also providing the container with an `ExceptionTranslator` implementation that translates Cassandra exceptions to exceptions in Spring's portable `DataAccessException` hierarchy. This hierarchy and the use of -`@Repository` is described in {spring-framework-docs}data-access.html[Spring's DAO support features]. +`@Repository` is described in {springDocsUrl}data-access.html[Spring's DAO support features]. The following example shows Java-based factory class usage: diff --git a/src/main/asciidoc/reference/exception-translation.adoc b/src/main/asciidoc/reference/exception-translation.adoc index 9e1cc7d00..b7922409e 100644 --- a/src/main/asciidoc/reference/exception-translation.adoc +++ b/src/main/asciidoc/reference/exception-translation.adoc @@ -1,9 +1,10 @@ == Exception Translation The Spring Framework provides exception translation for a wide variety of database and mapping technologies. -This has traditionally been for JDBC and JPA. Spring Data for Apache Cassandra extends this feature to Apache Cassandra by providing an implementation of the `org.springframework.dao.support.PersistenceExceptionTranslator` interface. +This has traditionally been for JDBC and JPA. +Spring Data for Apache Cassandra extends this feature to Apache Cassandra by providing an implementation of the `org.springframework.dao.support.PersistenceExceptionTranslator` interface. -The motivation behind mapping to Spring's {spring-framework-docs}html/dao.html#dao-exceptions[consistent data access exception hierarchy] +The motivation behind mapping to Spring's {springDocsUrl}html/dao.html#dao-exceptions[consistent data access exception hierarchy] is to let you write portable and descriptive exception handling code without resorting to coding against and handling specific Cassandra exceptions. All of Spring's data access exceptions are inherited from the `DataAccessException` class, so you can be sure that you can catch all database-related exceptions within a single try-catch block. diff --git a/src/main/asciidoc/reference/mapping.adoc b/src/main/asciidoc/reference/mapping.adoc index cd2163f82..8f329691f 100644 --- a/src/main/asciidoc/reference/mapping.adoc +++ b/src/main/asciidoc/reference/mapping.adoc @@ -109,7 +109,7 @@ The following table maps Spring Data types to Cassandra types: |=== Each supported type maps to a default -https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cql_data_types_c.html[Cassandra data type]. +https://docs.datastax.com/en/cql-oss/3.x/cql/cql_reference/cql_data_types_c.html[Cassandra data type]. Java types can be mapped to other Cassandra types by using `@CassandraType`, as the following example shows: .Enum mapping to numeric types diff --git a/src/main/asciidoc/reference/reactive-cassandra-repositories.adoc b/src/main/asciidoc/reference/reactive-cassandra-repositories.adoc index 15b71ad4a..fef5a0175 100644 --- a/src/main/asciidoc/reference/reactive-cassandra-repositories.adoc +++ b/src/main/asciidoc/reference/reactive-cassandra-repositories.adoc @@ -10,7 +10,7 @@ Reactive usage is broken up into two phases: Composition and Execution. Calling repository methods lets you compose a reactive sequence by obtaining `Publisher` instances and applying operators. No I/O happens until you subscribe. -Passing the reactive sequence to a reactive execution infrastructure, such as {spring-framework-docs}web.html#web-reactive[Spring WebFlux] +Passing the reactive sequence to a reactive execution infrastructure, such as {springDocsUrl}web.html#web-reactive[Spring WebFlux] or https://vertx.io/docs/vertx-reactive-streams/java/[Vert.x]), subscribes to the publisher and initiate the actual execution. See https://projectreactor.io/docs/core/release/reference/#reactive.subscribe[the Project reactor documentation] for more detail. diff --git a/src/main/asciidoc/reference/reactive-cassandra.adoc b/src/main/asciidoc/reference/reactive-cassandra.adoc index 7cfb3eb9f..32fcd7d60 100644 --- a/src/main/asciidoc/reference/reactive-cassandra.adoc +++ b/src/main/asciidoc/reference/reactive-cassandra.adoc @@ -7,8 +7,8 @@ The reactive Cassandra support contains a wide range of features: * `ReactiveCqlTemplate` helper class that increases productivity by properly handling common Cassandra data access operations. * `ReactiveCassandraTemplate` helper class that increases productivity by using `ReactiveCassandraOperations` in a reactive manner. It includes integrated object mapping between tables and POJOs. -* Exception translation into Spring's portable {spring-framework-docs}data-access.html#dao-exceptions[Data Access Exception Hierarchy]. -* Feature rich object mapping integrated with Spring's {spring-framework-docs}core.html#core-convert[Conversion Service]. +* Exception translation into Spring's portable {springDocsUrl}data-access.html#dao-exceptions[Data Access Exception Hierarchy]. +* Feature rich object mapping integrated with Spring's {springDocsUrl}core.html#core-convert[Conversion Service]. * Java-based Query, Criteria, and Update DSLs. * Automatic implementation of `Repository` interfaces, including support for custom finder methods. @@ -19,7 +19,7 @@ Spring Data for Apache Cassandra uses consistent naming conventions on objects i == Getting Started Spring Data for Apache Cassandra requires Apache Cassandra 2.1 or later and Datastax Java Driver 4.0 or later. -An easy way to quickly set up and bootstrap a working environment is to create a Spring-based project in https://spring.io/tools/sts[STS] or use https://start.spring.io/[Spring Initializer]. +An easy way to quickly set up and bootstrap a working environment is to create a Spring-based project in https://spring.io/tools[Spring Tools] or use https://start.spring.io/[Spring Initializer]. First, you need to set up a running Apache Cassandra server. See the @@ -64,7 +64,7 @@ If using a milestone release instead of a GA release, you also need to add the l spring-milestone Spring Maven MILESTONE Repository - https://repo.spring.io/libs-milestone + https://repo.spring.io/milestone ---- @@ -114,8 +114,8 @@ You can do so either by using Java-based bean metadata or by using XML-based bea These are discussed in the following sections. NOTE: For those not familiar with how to configure the Spring container using Java-based bean metadata instead of XML-based metadata, see the high-level introduction in the reference docs -https://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/new-in-3.0.html#new-java-configuration[here] -as well as the detailed documentation {spring-framework-docs}core.html#beans-java-instantiating-container[here]. +https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#beans-java[here] +as well as the detailed documentation {springDocsUrl}core.html#beans-java-instantiating-container[here]. [[reactive.cassandra.java-config]] === Registering a Session instance using Java-based metadata