This documentation provides instructions on how to integrate JNoSQL, an implementation of Jakarta NoSQL, into a Quarkus project using the Quarkus JNoSQL Extension. This extension supports JNoSQL and facilitates using NoSQL databases in your Quarkus applications.
ℹ️ Recommended Quarkus version: 3.2.2.Final
or higher
To begin using JNoSQL with Quarkus, follow these steps:
-
Add the Quarkus JNoSQL Extension to your project's dependencies. You can find the latest version on Maven Central:
-
Define your entities using JNoSQL annotations. Here's an example entity class:
import jakarta.nosql.Column; import jakarta.nosql.Entity; import jakarta.nosql.Id; @Entity public class TestEntity { @Id private String id; @Column private String testField; }
Configure the JNoSql KeyValue Quarkus extension by specifying the database's name in your application.properties
:
jnosql.keyvalue.database=my-database-name
Inject the KeyValueTemplate
into your class and use it to interact with the KeyValue database:
import jakarta.inject.Inject;
import org.jnosql.artemis.key.KeyValueTemplate;
@Inject
private KeyValueTemplate template;
public void insert(TestEntity entity) {
template.insert(entity);
}
Add the ArangoDB dependency to your project's pom.xml
:
<dependency>
<groupId>io.quarkiverse.jnosql</groupId>
<artifactId>quarkus-jnosql-keyvalue-arangodb</artifactId>
</dependency>
For specific configuration details, please refer to the ArangoDB JNoSQL driver.
Add the DynamoDB dependency to your project's pom.xml
:
<dependency>
<groupId>io.quarkiverse.jnosql</groupId>
<artifactId>quarkus-jnosql-keyvalue-dynamodb</artifactId>
</dependency>
Please refer to the DynamoDB Quarkiverse extension for specific configuration details.
Add the Hazelcast dependency to your project's pom.xml
:
<dependency>
<groupId>io.quarkiverse.jnosql</groupId>
<artifactId>quarkus-jnosql-keyvalue-hazelcast</artifactId>
</dependency>
Please refer to the Quarkus Hazelcast extension for specific configuration details.
Add the Redis dependency to your project's pom.xml
:
<dependency>
<groupId>io.quarkiverse.jnosql</groupId>
<artifactId>quarkus-jnosql-keyvalue-redis</artifactId>
</dependency>
For specific configuration details, please refer to the Redis Quarkus extension.
Configure the JNoSql Document Quarkus extension by specifying the database's name in your application.properties
:
jnosql.document.database=my-database-name
Inject the DocumentTemplate
into your class and use it to interact with the Document database:
import jakarta.inject.Inject;
import org.jnosql.artemis.document.DocumentTemplate;
@Inject
private DocumentTemplate template;
public void insert(TestDocumentEntity entity) {
template.insert(entity);
}
Add the ArangoDB dependency to your project's pom.xml
:
<dependency>
<groupId>io.quarkiverse.jnosql</groupId>
<artifactId>quarkus-jnosql-document-arangodb</artifactId>
</dependency>
For specific configuration details, please refer to the ArangoDB JNoSQL driver.
Add the CouchDB dependency to your project's pom.xml
:
<dependency>
<groupId>io.quarkiverse.jnosql</groupId>
<artifactId>quarkus-jnosql-document-couchdb</artifactId>
</dependency>
For specific configuration details, please refer to the CouchDB JNoSQL driver.
Add the Elasticsearch dependency to your project's pom.xml
:
<dependency>
<groupId>io.quarkiverse.jnosql</groupId>
<artifactId>quarkus-jnosql-document-elasticsearch</artifactId>
</dependency>
Please refer to the Elasticsearch Quarkus extension for specific configuration details.
Add the MongoDB dependency to your project's pom.xml
:
<dependency>
<groupId>io.quarkiverse.jnosql</groupId>
<artifactId>quarkus-jnosql-document-mongodb</artifactId>
</dependency>
For specific configuration details, please refer to the MongoDB Quarkus extension.
Add the Solr dependency to your project's pom.xml
:
<dependency>
<groupId>io.quarkiverse.jnosql</groupId>
<artifactId>quarkus-jnosql-document-solr</artifactId>
</dependency>
For specific configuration details, please refer to the Solr JNoSQL driver.
Configure the JNoSql Column Quarkus extension by specifying the database's name in your application.properties
:
jnosql.column.database=my-database-name
Inject the ColumnTemplate
into your class and use it to interact with the Column database:
import jakarta.inject.Inject;
import org.jnosql.artemis.column.ColumnTemplate;
@Inject
private ColumnTemplate template;
public void insert(TestColumnEntity entity) {
template.insert(entity);
}
Add the Cassandra dependency to your project's pom.xml
:
<dependency>
<groupId>io.quarkiverse.jnosql</groupId>
<artifactId>quarkus-jnosql-column-cassandra</artifactId>
</dependency>
Please refer to the Cassandra Quarkus extension for specific configuration details.
Thanks to these wonderful people for their contributions:
- amoscatelli 💻 🚧
- dearrudam 💻 🚧
This project follows the all-contributors specification. Contributions of any kind are welcome!