Skip to content

Commit a5597c3

Browse files
committed
Merge branch 'dev'
2 parents 4da0599 + a9a226e commit a5597c3

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/main/java/com/appcenter/marketplace/global/config/RedisConfig.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.fasterxml.jackson.databind.ObjectMapper;
55
import com.fasterxml.jackson.databind.jsontype.BasicPolymorphicTypeValidator;
66
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
7+
import org.springframework.beans.factory.annotation.Value;
78
import org.springframework.boot.autoconfigure.cache.RedisCacheManagerBuilderCustomizer;
89
import org.springframework.cache.CacheManager;
910
import org.springframework.cache.annotation.EnableCaching;
@@ -24,9 +25,15 @@
2425
@EnableCaching
2526
public class RedisConfig {
2627

28+
@Value("${spring.redis.host}")
29+
private String redisHost;
30+
31+
@Value("${spring.redis.port}")
32+
private int redisPort;
33+
2734
@Bean
2835
public RedisConnectionFactory redisConnectionFactory() {
29-
return new LettuceConnectionFactory(); // Lettuce 사용
36+
return new LettuceConnectionFactory(redisHost, redisPort); // Lettuce 사용
3037
}
3138

3239
@Bean

0 commit comments

Comments
 (0)