redis-starter

Redis Starter

License

License

Categories

Categories

Redis Data Databases
GroupId

GroupId

com.github.enesusta
ArtifactId

ArtifactId

redis-starter
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

redis-starter
Redis Starter
Project URL

Project URL

https://github.com/enesusta/redis-starter
Source Code Management

Source Code Management

http://github.com/enesusta/redis-starter

Download redis-starter

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.enesusta/redis-starter/ -->
<dependency>
    <groupId>com.github.enesusta</groupId>
    <artifactId>redis-starter</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.enesusta/redis-starter/
implementation 'com.github.enesusta:redis-starter:1.0.1'
// https://jarcasting.com/artifacts/com.github.enesusta/redis-starter/
implementation ("com.github.enesusta:redis-starter:1.0.1")
'com.github.enesusta:redis-starter:jar:1.0.1'
<dependency org="com.github.enesusta" name="redis-starter" rev="1.0.1">
  <artifact name="redis-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.enesusta', module='redis-starter', version='1.0.1')
)
libraryDependencies += "com.github.enesusta" % "redis-starter" % "1.0.1"
[com.github.enesusta/redis-starter "1.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
redis.clients : jedis jar 3.3.0

Project Modules

There are no modules declared in this project.

Install

<dependency>
  <groupId>com.github.enesusta</groupId>
  <artifactId>redis-starter</artifactId>
  <version>1.0.1</version>
</dependency>

Example:

import com.github.enesusta.redis.PoolRedisInstance;
import com.github.enesusta.redis.RedisConfiguration;
import com.github.enesusta.redis.RedisInstance;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import redis.clients.jedis.JedisPool;

@Configuration
public class RedisPoolConfiguration {

    @Value("${spring.redis.jedis.password}")
    private String password;

    @Bean
    public JedisPool jedisPool() {
        final RedisConfiguration redisConfiguration = new RedisConfiguration.Builder(password)
                .host("localhost")
                .port(6379)
                .build();

        final RedisInstance<JedisPool> jedisPoolRedisInstance = new PoolRedisInstance(redisConfiguration);
        return jedisPoolRedisInstance.getRedisInstance();
    }

}

Versions

Version
1.0.1
1.0.0