<div align="center">
<br/>
<br/>
<img width="360" src="docs/media/images/logo.svg" alt="Redis OM" />
<br/>
<br/>
</div>
<p><p align="center">Object Mapping (and more) for Redis!</p></p>
---
**Redis OM Spring** extends [Spring Data Redis](https://spring.io/projects/spring-data-redis) to take full advantage of Redis and [Redis Stack](https://reedis.io/docs/stack/).
| Stage | Release | Snapshot | Issues | Resolution | Code QL | License | SDR Ver. |
| ------------------------------------------------- | -------------------------------------------- | ----------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -------------------------------------------- | ---------------------------------------- | ------------------------------------------------------- |
| [![Project stage][badge-Stage]][badge-stage-page] | [![Releases][badge-releases]][link-releases] | [![Snapshots][badge-snapshots]][link-snapshots] | [![Percentage of issues still open][badge-open-issues]][open-issues] | [![Average time to resolve an issue][badge-issue-resolution]][issue-resolution] | [![CodeQL][badge-codeql]][badge-codeql-page] | [![License][license-image]][license-url] | [![SDR Version][sdr-badge-releases]][sdr-link-releases] |
Learn / Discuss / Collaborate
| Discord | Twitch | YouTube | Twitter |
| ----------------------------------------- | -------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| [![Discord][discord-shield]][discord-url] | [![Twitch][twitch-shield]][twitch-url] | [![YouTube][youtube-shield]][youtube-url] | [![Twitter][twitter-shield]][twitter-url] |
<details>
<summary><strong>Table of contents</strong></summary>
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [ð¡ Why Redis OM?](#-why-redis-om)
- [ð Redis OM Spring](#-redis-om-spring)
- [ð Getting Started](#-getting-started)
- [ð Launch Redis](#-launch-redis)
- [The SpringBoot App](#the-springboot-app)
- [ðââï¸ The Mapped Model](#ï¸-the-mapped-model)
- [𧰠The Repository](#-the-repository)
- [ð¤ Querying with Entity Streams](#-querying-with-entity-streams)
- [ð Entity Meta-model](#-entity-meta-model)
- [ð» Maven configuration](#-maven-configuration)
- [Official Releases](#official-releases)
- [Explicitly configuring OM as an annotation processor](#explicitly-configuring-om-as-an-annotation-processor)
- [Snapshots](#snapshots)
- [ð Gradle configuration](#-gradle-configuration)
- [Add Repository - Snapshots Only](#add-repository---snapshots-only)
- [Dependency](#dependency)
- [ð Documentation](#-documentation)
- [Demos](#demos)
- [Basic JSON Mapping and Querying](#basic-json-mapping-and-querying)
- [âï¸ Troubleshooting](#ï¸-troubleshooting)
- [⨠So How Do You Get RediSearch and RedisJSON?](#-so-how-do-you-get-redisearch-and-redisjson)
- [ð Contributing](#-contributing)
- [ð§âð¤âð§ Sibling Projects](#-sibling-projects)
- [ð License](#-license)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
</details>
## ð¡ Why Redis OM?
The Redis OM family of client libraries provide high-level abstractions, idiomatically implemented for your language and platform of choice. We currently cater to the Node, Python, .NET, and Spring communities.
## ð Redis OM Spring
Redis OM Spring provides powerful repository and custom object-mapping abstractions built on top of the Spring Data Redis ([SDR](https://spring.io/projects/spring-data-redis)) framework.
This **preview** release provides all Spring Data Redis, plus:
* `@Document` annotation to map Spring Data models to Redis JSON documents
* Enhancement to the Spring Data Redis `@RedisHash` via `@EnableRedisEnhancedRepositories`:
- uses Redis' native search engine (RediSearch) for secondary indexing
- uses [ULID](https://github.com/ulid/spec) for `@Id` annotated fields
* `RedisDocumentRepository` with automatic implementation of Repository interfaces for complex querying capabilities using `@EnableRedisDocumentRepositories`
* Declarative search indexes via `@Indexed`
* Full-text search indexes via `@Searchable`
* `EntityStream`s: Streams-based Query and Aggregations Builder
* `@Bloom` annotation to determine very fast, with and with high degree of certainty, whether a value is in a collection.
* `@Vectorize` annotation to generate embeddings for text and images for use in Vector Similarity Searches
* Vector Similarity Search API (See [Redis Stack Vectors](https://redis.io/docs/stack/search/reference/vectors/))
**Note:** Redis OM Spring depends on Jedis.
## ð Getting Started
Here is a quick teaser of an application using Redis OM Spring to map a Spring Data model
using a RedisJSON document.
### ð Launch Redis
Redis OM Spring relies on the search, query, and JSON capabilities of [Redis Stack](https://reedis.io/docs/stack/).
Before writing any code, you'll need a Redis Stack. The quickest way to get
this is with Docker:
```sh
docker run -p 6379:6379 -p 8001:8001 redis/redis-stack
```
This launches [redis-stack](https://redis.io/docs/stack/), an extension of Redis that adds several modern data
structures to Redis. You'll also notice that if you open up `http://localhost:8001`, you'll have access to the
redis-insight GUI, a GUI you can use to visualize and work with your data in Redis.
We have also provided a Docker Compose YAML file for you to quickly get started
using [Redis Stack](https://redis.io/docs/stack/).
To launch the docker compose application, on the command line (or via Docker Desktop), clone this repository and run
(from the root folder):
```bash
docker compose up
```
### Configuring your Redis Connection
By default, Redis OM Spring connects to `localhost` at port `6379`. If
your instance is running somewhere else, you can configure the connection
in your `application.properties` or `application.yaml`:
In `application.properties`:
```
spring.data.redis.host=your.cloud.db.redislabs.com
spring.data.redis.port=12345
spring.data.redis.password=xxxxxxxx
spring.data.redis.username=default
```
In `application.yaml`:
```
spring:
data:
redis:
host: your.cloud.db.redislabs.com
port: 12345
password: xxxxxxxx
username: default
```
### The SpringBoot App
Use the `@EnableRedisDocumentRepositories` annotation to scan for `@Document` annotated Spring models,
Inject repositories beans implementing `RedisDocumentRepository` which you can use for CRUD operations and custom queries (all by declaring Spring Data Query Interfaces):
```java
package com.redis.om.documents;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.geo.Point;
import com.redis.om.documents.domain.Company;
import com.redis.om.documents.repositories.CompanyRepository;
@SpringBootApplication
@Configuration
@EnableRedisDocumentRepositories(basePackages = "com.redis.om.documents.*")
没有合适的资源?快使用搜索试试~ 我知道了~
使用Redis生态提供多语言/跨平台的高级抽象客户端
共694个文件
java:598个
properties:11个
yml:9个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 200 浏览量
2023-12-04
23:39:01
上传
评论
收藏 3.61MB ZIP 举报
温馨提示
Redis OM目标是为使用Redis生态提供多语言/跨平台的高级抽象客户端。它提供了简化Redis操作的功能,使得在Spring应用中使用Redis变得更加便捷。目前已支持多种语言像Node、Python、.net和Spring等。
资源推荐
资源详情
资源评论
收起资源包目录
使用Redis生态提供多语言/跨平台的高级抽象客户端 (694个子文件)
.classpath 2KB
mvnw.cmd 6KB
mvnw.cmd 6KB
mvnw.cmd 6KB
mvnw.cmd 6KB
mvnw.cmd 6KB
mvnw.cmd 6KB
styles.csv 605KB
airport_codes.csv 5KB
spring.factories 394B
.gitignore 550B
.gitignore 523B
.gitignore 461B
.gitignore 418B
.gitignore 418B
.gitignore 395B
fragments.html 11KB
index.html 2KB
favicon.ico 15KB
org.springframework.boot.autoconfigure.AutoConfiguration.imports 62B
maven-wrapper.jar 50KB
maven-wrapper.jar 50KB
maven-wrapper.jar 50KB
maven-wrapper.jar 50KB
maven-wrapper.jar 50KB
maven-wrapper.jar 50KB
TupleTest.java 101KB
EntityStreamDocsTest.java 84KB
TuplesTest.java 82KB
EntityStreamHashTest.java 51KB
MappingRedisOMConverter.java 47KB
MetamodelGenerator.java 36KB
EntityStreamsAggregationsDocsTest.java 36KB
RediSearchIndexer.java 34KB
RediSearchQuery.java 27KB
RedisEnhancedQuery.java 27KB
BasicRedisDocumentMappingTest.java 26KB
ObjectUtils.java 25KB
SearchStreamImpl.java 24KB
Tuples.java 24KB
EntityStreamsIssuesTest.java 24KB
BasicRedisHashMappingTest.java 23KB
MetamodelGeneratorTest.java 22KB
AggregationStreamImpl.java 19KB
ObjectUtilsTest.java 18KB
SimpleRedisDocumentRepository.java 18KB
RedisModulesConfiguration.java 18KB
RedisDocumentQueryByExampleTest.java 18KB
RedisEnhancedKeyValueAdapter.java 16KB
AggregationAnnotationTest.java 16KB
WrapperSearchStreamTest.java 16KB
ReturnFieldsSearchStreamImpl.java 15KB
GameRepository.java 15KB
AggregationAnnotationTest.java 15KB
RedisHashQueryByExampleTest.java 14KB
GameRepository.java 14KB
RedisJSONKeyValueAdapter.java 14KB
ComplexDocumentSearchTest.java 13KB
SimpleRedisEnhancedRepository.java 13KB
RedisEnhancedRepositoryFactory.java 13KB
ExampleToNodeConverter.java 12KB
RedisDocumentSearchTest.java 12KB
RedisHashSearchTest.java 12KB
QueryClause.java 11KB
RedisDocumentRepositoryFactory.java 11KB
AutoCompleteAspect.java 11KB
SerializationTest.java 10KB
WrapperSearchStream.java 10KB
Fields.java 9KB
EntityStreamsZipCodeDataAggregationsTest.java 9KB
OpsForJSONTest.java 8KB
FaceDetectionTranslator.java 8KB
RedisOMProperties.java 8KB
ReferenceTest.java 7KB
Vigintuple.java 7KB
EnableRedisDocumentRepositories.java 7KB
EnableRedisEnhancedRepositories.java 7KB
FieldsTest.java 7KB
RedisEnhancedRepositoryFactoryBean.java 7KB
Novemdecuple.java 7KB
SerializationTest.java 7KB
ProductController.java 7KB
DefaultFeatureExtractor.java 6KB
EntityStreamsHashVSSTests.java 6KB
Octodecuple.java 6KB
SearchOperationsImpl.java 6KB
EntityStreamsAggregationsHashPagingTest.java 6KB
VectorizeHashTest.java 6KB
VectorizeDocumentTest.java 6KB
Septendecuple.java 6KB
EntityStreamsAggregationsDocsPagingTest.java 5KB
DocumentLanguageTest.java 5KB
JSONOperationsImpl.java 5KB
Sexdecuple.java 5KB
EntityStreamHighlightHashTest.java 5KB
MavenWrapperDownloader.java 5KB
MavenWrapperDownloader.java 5KB
MavenWrapperDownloader.java 5KB
MavenWrapperDownloader.java 5KB
MavenWrapperDownloader.java 5KB
共 694 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
UnknownToKnown
- 粉丝: 1w+
- 资源: 590
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功