Spring Redis Modules
Spring Redis Modules provides Spring applications with access to Redis Modules using Mesclun
Usage
Add Spring Redis Modules to your application dependencies:
Maven
<dependency>
<groupId>com.redislabs</groupId>
<artifactId>spring-redis-modules</artifactId>
<version>x.y.z</version>
</dependency>
Gradle
implementation 'com.redislabs:spring-redis-modules:x.y.z'
Inject and use RedisModulesClient or StatefulRedisModulesConnection:
public class Example {
@Autowired
StatefulRedisModulesConnection<String, String> connection;
public void testSearch() {
connection.sync().search("music", "Lalo Schifrin");
}
public void testGears() {
connection.sync().pyExecute("GB().run('artist:*')");
}
public void testTimeSeries() {
connection.sync().add("temp:3:11", 1548149181, 30);
}
}