Skip to content

Commit

Permalink
Merge pull request quarkusio#12648 from ashatch/ashatch/cassandra-doc…
Browse files Browse the repository at this point in the history
…-codegen

Cassandra doc explains how to configure the required annotation processor
  • Loading branch information
gsmet authored Oct 19, 2020
2 parents 1dcfe86 + 05974ce commit 7c1d047
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/main/asciidoc/cassandra.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ The most important part of the `pom.xml` is adding the `cassandra-quarkus` exten
</dependency>
----

Also make sure to follow the
link:https://docs.datastax.com/en/developer/java-driver/latest/manual/mapper/config/[instructions]
on how to add an annotation processor to the compiler configuration. When the project is compiled,
additional mapper classes are generated.

== Creating JSON REST service

In this example, we will create an application to manage a list of fruits.
Expand Down Expand Up @@ -179,6 +184,9 @@ public class FruitDaoProducer {
Note how the `QuarkusCqlSession` instance is injected automatically by the cassandra-quarkus
extension in the `FruitDaoProducer` constructor.

Also note that `FruitMapperBuilder` is one of the classes generated automatically by the
`java-driver-mapper-processor` annotation processor.

Now create a `FruitService` that will be the business layer of our application and store/load the
fruits from the Cassandra database.

Expand Down

0 comments on commit 7c1d047

Please sign in to comment.