Package it.univr.passportease.config
Class RedisConfig
java.lang.Object
it.univr.passportease.config.RedisConfig
Redis configuration class.
It is used to configure the connection to the Redis server
and to create a RedisTemplate bean. Redis configuration is
read from the application.properties file and the port is set
to 6379 by default.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.redis.connection.jedis.JedisConnectionFactory
Creates a connection to the Redis server.<T> org.springframework.data.redis.core.RedisTemplate
<String, T> Creates a RedisTemplate bean, used to interact with the Redis server.
-
Field Details
-
redisHost
Redis host.
-
-
Constructor Details
-
RedisConfig
public RedisConfig()
-
-
Method Details
-
redisConnectionFactory
@Bean public org.springframework.data.redis.connection.jedis.JedisConnectionFactory redisConnectionFactory()Creates a connection to the Redis server.- Returns:
- JedisConnectionFactory, used to create a connection to the Redis server
-
redisTemplate
Creates a RedisTemplate bean, used to interact with the Redis server.- Type Parameters:
T
- Type of the RedisTemplate- Returns:
- RedisTemplate, used to interact with the Redis server
-