Skip to content

Commit f63e748

Browse files
committed
Fix example code highlighting for reactive examples.
Also, update documentation URLs. Closes #1429
1 parent d89a50b commit f63e748

File tree

7 files changed

+29
-133
lines changed

7 files changed

+29
-133
lines changed

README.adoc

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
image:https://spring.io/badges/spring-data-cassandra/ga.svg[Spring Data for Apache Cassandra,link=https://projects.spring.io/spring-data-cassandra/#quick-start]
2-
image:https://spring.io/badges/spring-data-cassandra/snapshot.svg[Spring Data for Apache Cassandra,link=https://projects.spring.io/spring-data-cassandra/#quick-start]
3-
41
= Spring Data for Apache Cassandra image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-cassandra%2Fmain&subject=Build[link=https://jenkins.spring.io/view/SpringData/job/spring-data-cassandra/] https://gitter.im/spring-projects/spring-data[image:https://badges.gitter.im/spring-projects/spring-data.svg[Gitter]]
52

63
The primary goal of the https://projects.spring.io/spring-data[Spring Data] project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.
@@ -134,14 +131,14 @@ https://github.com/spring-projects/spring-data-cassandra/issues[issue tracker] t
134131
== Building from Source
135132

136133
You don’t need to build from source to use Spring Data (binaries in https://repo.spring.io[repo.spring.io]), but if you want to try out the latest and greatest, Spring Data can be easily built with the https://github.com/takari/maven-wrapper[maven wrapper].
137-
You also need JDK 1.8.
134+
You also need JDK 17.
138135

139136
[source,bash]
140137
----
141138
$ ./mvnw clean install
142139
----
143140

144-
If you want to build with the regular `mvn` command, you will need https://maven.apache.org/run-maven/index.html[Maven v3.5.0 or above].
141+
If you want to build with the regular `mvn` command, you will need https://maven.apache.org/run-maven/index.html[Maven v3.8.0 or above].
145142

146143
_Also see link:CONTRIBUTING.adoc[CONTRIBUTING.adoc] if you wish to submit pull requests, and in particular please sign the https://cla.pivotal.io/sign/spring[Contributor’s Agreement] before your first non-trivial change._
147144

@@ -159,10 +156,10 @@ Building the documentation builds also the project without running tests.
159156

160157
[source,bash]
161158
----
162-
$ ./mvnw clean install -Pdistribute
159+
$ ./mvnw clean install -Pantora
163160
----
164161

165-
The generated documentation is available from `target/site/reference/html/index.html`.
162+
The generated documentation is available from `spring-data-cassandra-distribution/antora/site/index.html`.
166163

167164
== Examples
168165

src/main/antora/modules/ROOT/pages/cassandra/cql-template.adoc

+10-10
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ include::example$CqlTemplateExamples.java[tags=rowCount]
4646
4747
Reactive::
4848
+
49-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
49+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
5050
----
5151
include::example$ReactiveCqlTemplateExamples.java[tags=rowCount]
5252
----
@@ -65,7 +65,7 @@ include::example$CqlTemplateExamples.java[tags=countOfActorsNamedJoe]
6565
6666
Reactive::
6767
+
68-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
68+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
6969
----
7070
include::example$ReactiveCqlTemplateExamples.java[tags=countOfActorsNamedJoe]
7171
----
@@ -84,7 +84,7 @@ include::example$CqlTemplateExamples.java[tags=lastName]
8484
8585
Reactive::
8686
+
87-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
87+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
8888
----
8989
include::example$ReactiveCqlTemplateExamples.java[tags=lastName]
9090
----
@@ -103,7 +103,7 @@ include::example$CqlTemplateExamples.java[tags=rowMapper]
103103
104104
Reactive::
105105
+
106-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
106+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
107107
----
108108
include::example$ReactiveCqlTemplateExamples.java[tags=rowMapper]
109109
----
@@ -122,7 +122,7 @@ include::example$CqlTemplateExamples.java[tags=listOfRowMapper]
122122
123123
Reactive::
124124
+
125-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
125+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
126126
----
127127
include::example$ReactiveCqlTemplateExamples.java[tags=listOfRowMapper]
128128
----
@@ -143,7 +143,7 @@ include::example$CqlTemplateExamples.java[tags=findAllActors]
143143
144144
Reactive::
145145
+
146-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
146+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
147147
----
148148
include::example$ReactiveCqlTemplateExamples.java[tags=findAllActors]
149149
----
@@ -168,7 +168,7 @@ include::example$CqlTemplateExamples.java[tags=insert]
168168
169169
Reactive::
170170
+
171-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
171+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
172172
----
173173
include::example$ReactiveCqlTemplateExamples.java[tags=insert]
174174
----
@@ -187,7 +187,7 @@ include::example$CqlTemplateExamples.java[tags=update]
187187
188188
Reactive::
189189
+
190-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
190+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
191191
----
192192
include::example$ReactiveCqlTemplateExamples.java[tags=update]
193193
----
@@ -206,7 +206,7 @@ include::example$CqlTemplateExamples.java[tags=delete]
206206
207207
Reactive::
208208
+
209-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
209+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
210210
----
211211
include::example$ReactiveCqlTemplateExamples.java[tags=delete]
212212
----
@@ -255,7 +255,7 @@ template.setSessionFactory(new DefaultSessionFactory(session));
255255
256256
Reactive::
257257
+
258-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
258+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
259259
----
260260
261261
CqlSession session = … // get a Cassandra Session

src/main/antora/modules/ROOT/pages/cassandra/getting-started.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
= Getting Started
33

44
Spring Data for Apache Cassandra requires Apache Cassandra 2.1 or later and Datastax Java Driver 4.0 or later.
5-
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].
5+
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/#!type=maven-project&dependencies=data-cassandra[start.spring.io].
66

77
[[cassandra.examples-repo]]
88
== Examples Repository
@@ -89,7 +89,7 @@ include::example$CassandraApplication.java[tags=file]
8989
9090
Reactive::
9191
+
92-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
92+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
9393
----
9494
include::example$ReactiveCassandraApplication.java[tags=file]
9595
----

src/main/antora/modules/ROOT/pages/cassandra/prepared-statements.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ include::example$CqlTemplateExamples.java[tags=lastName]
3333
3434
Reactive::
3535
+
36-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
36+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
3737
----
3838
include::example$ReactiveCqlTemplateExamples.java[tags=lastName]
3939
----
@@ -52,7 +52,7 @@ include::example$CqlTemplateExamples.java[tags=preparedStatement]
5252
5353
Reactive::
5454
+
55-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
55+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
5656
----
5757
include::example$ReactiveCqlTemplateExamples.java[tags=preparedStatement]
5858
----
@@ -83,7 +83,7 @@ include::example$CassandraTemplateExamples.java[tags=preparedStatement]
8383
8484
Reactive::
8585
+
86-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
86+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
8787
----
8888
include::example$ReactiveCassandraTemplateExamples.java[tags=preparedStatement]
8989
----

src/main/antora/modules/ROOT/pages/cassandra/repositories/repositories.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ interface PersonRepository extends CrudRepository<Person, String> {
4141
4242
Reactive::
4343
+
44-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
44+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
4545
----
4646
interface PersonRepository extends ReactiveCrudRepository<Person, String> {
4747

src/main/antora/modules/ROOT/pages/cassandra/template.adoc

+9-9
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private CassandraOperations cassandraOperations;
6262
6363
Reactive::
6464
+
65-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
65+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
6666
----
6767
@Autowired
6868
private ReactiveCassandraOperations reactiveCassandraOperations;
@@ -85,7 +85,7 @@ private CassandraOperations cassandraOperations;
8585
8686
Reactive::
8787
+
88-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
88+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
8989
----
9090
@Autowired
9191
@Qualifier("keyspaceOneTemplateBeanId")
@@ -110,7 +110,7 @@ CassandraOperations cassandraOperations = applicationContext.getBean("cassandraT
110110
111111
Reactive::
112112
+
113-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
113+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
114114
----
115115
ReactiveCassandraOperations cassandraOperations = applicationContext.getBean("ReactiveCassandraOperations", ReactiveCassandraOperations.class);
116116
----
@@ -151,7 +151,7 @@ List<Person> result = cassandraTemplate.select(query(where("age").is(50))
151151
152152
Reactive::
153153
+
154-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
154+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
155155
----
156156
import static org.springframework.data.cassandra.core.query.Criteria.where;
157157
import static org.springframework.data.cassandra.core.query.Query.query;
@@ -249,7 +249,7 @@ List<SWCharacter> all = ops.query(SWCharacter.class)
249249
250250
Reactive::
251251
+
252-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
252+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
253253
----
254254
Flux<SWCharacter> all = ops.query(SWCharacter.class)
255255
.inTable("star_wars") <1>
@@ -278,7 +278,7 @@ List<Jedi> all = ops.query(SWCharacter.class) <1>
278278
279279
Reactive::
280280
+
281-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
281+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
282282
----
283283
Flux<Jedi> all = ops.query(SWCharacter.class) <1>
284284
.as(Jedi.class) <2>
@@ -347,7 +347,7 @@ Person queriedBob = cassandraTemplate.selectOneById(query(where("age").is(33)),
347347
348348
Reactive::
349349
+
350-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
350+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
351351
----
352352
import static org.springframework.data.cassandra.core.query.Criteria.where;
353353
import static org.springframework.data.cassandra.core.query.Query.query;
@@ -385,7 +385,7 @@ cassandraTemplate().getCqlOperations().execute(cql);
385385
386386
Reactive::
387387
+
388-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
388+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
389389
----
390390
String cql = "INSERT INTO person (age, name) VALUES (39, 'Bob')";
391391
@@ -446,7 +446,7 @@ boolean applied = cassandraTemplate.update(Query.query(where("id").is("foo")),
446446
447447
Reactive::
448448
+
449-
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
449+
[source,java,indent=0,subs="verbatim,quotes",role="secondary"]
450450
----
451451
import static org.springframework.data.cassandra.core.query.Criteria.where;
452452
import org.springframework.data.cassandra.core.query.Query;

src/main/antora/modules/ROOT/pages/preface.adoc

-101
This file was deleted.

0 commit comments

Comments
 (0)