Skip to content

Springboot Jedis Properties

Jedis Standalone

# Select Redis database index (0-15)
spring.redis.database=0

# Redis server host address
spring.redis.host=146.56.223.148

# Redis server port
spring.redis.port=6379

# Redis access password (quotes required for special characters)
spring.redis.password=#pwd@redis

# Command execution timeout in milliseconds
spring.redis.timeout=2000

# Client implementation type (jedis/lettuce)
spring.redis.client-type=jedis

# Jedis Pool
# Enable Jedis connection pool
spring.redis.jedis.pool.enabled=true

# Maximum active connections in pool
spring.redis.jedis.pool.max-active=20

# Maximum idle connections in pool
spring.redis.jedis.pool.max-idle=10

# Minimum idle connections in pool
spring.redis.jedis.pool.min-idle=2

# Max wait time to get a connection (ms)
spring.redis.jedis.pool.max-wait=1000ms

Jedis Standalone Optional

# Redis connection URL (format: redis://[user:password@]host:port[/database])
spring.redis.url=146.56.223.148:6379

# Redis username (Redis 6+ ACL)
spring.redis.username=default

# Connection establishment timeout in milliseconds
spring.redis.connect-timeout=5000

# Client name identifier (for server-side monitoring)
spring.redis.client-name=""

# Enable SSL encrypted connection
spring.redis.ssl=false

# Custom Configuration
# Validate connection when borrowing from pool
spring.redis.test-on-borrow=true

Jedis Sentinel

# Select Redis database index (0-15)
spring.redis.database=0

# Redis access password (quotes required for special characters)
spring.redis.password=#pwd@redis

# Command execution timeout in milliseconds
spring.redis.timeout=2000

# Client implementation type (jedis/lettuce)
spring.redis.client-type=jedis

# Sentinel
# Master node name in Sentinel mode
spring.redis.sentinel.master=mymaster

# Sentinel node addresses (host:port, comma-separated)
spring.redis.sentinel.nodes=127.0.0.1:26379,127.0.0.2:26379,127.0.0.3:26379

# Jedis Pool
# Enable Jedis connection pool
spring.redis.jedis.pool.enabled=true

# Maximum active connections in pool
spring.redis.jedis.pool.max-active=20

# Maximum idle connections in pool
spring.redis.jedis.pool.max-idle=10

# Minimum idle connections in pool
spring.redis.jedis.pool.min-idle=2

# Max wait time to get a connection (ms)
spring.redis.jedis.pool.max-wait=1000ms

Jedis Sentinel Optional

# Redis username (Redis 6+ ACL)
spring.redis.username=default

# Connection establishment timeout in milliseconds
spring.redis.connect-timeout=5000

# Client name identifier (for server-side monitoring)
spring.redis.client-name=""

# Enable SSL encrypted connection
spring.redis.ssl=false

# Custom Configuration
# Validate connection when borrowing from pool
spring.redis.test-on-borrow=true

Jedis Cluster

# Redis access password (quotes required for special characters)
spring.redis.password=#pwd@redis

# Command execution timeout in milliseconds
spring.redis.timeout=2000

# Client implementation type (jedis/lettuce)
spring.redis.client-type=jedis

# Cluster
# Maximum number of redirects to follow when executing commands.
spring.redis.cluster.max-redirects=3

# Initial cluster node addresses (host:port, comma-separated)
spring.redis.cluster.nodes=127.0.0.1:6379,127.0.0.2:6379,127.0.0.3:6379

# Jedis Pool
# Enable Jedis connection pool
spring.redis.jedis.pool.enabled=true

# Maximum active connections in pool
spring.redis.jedis.pool.max-active=20

# Maximum idle connections in pool
spring.redis.jedis.pool.max-idle=10

# Minimum idle connections in pool
spring.redis.jedis.pool.min-idle=2

# Max wait time to get a connection (ms)
spring.redis.jedis.pool.max-wait=1000ms

Jedis Cluster Optional

# Redis username (Redis 6+ ACL)
spring.redis.username=default

# Connection establishment timeout in milliseconds
spring.redis.connect-timeout=5000

# Client name identifier (for server-side monitoring)
spring.redis.client-name=""

# Enable SSL encrypted connection
spring.redis.ssl=false

# Custom Configuration
# Validate connection when borrowing from pool
spring.redis.test-on-borrow=true