Skip to content

Commit

Permalink
Feat(#40) : fix host
Browse files Browse the repository at this point in the history
  • Loading branch information
versatile0010 committed Oct 23, 2023
1 parent 080b82d commit 7f87c6a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/numberone/backend/config/RedisConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.numberone.backend.properties.RedisProperties;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
Expand All @@ -14,9 +15,12 @@
public class RedisConfig {
private final RedisProperties redisProperties;

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

@Bean
public RedisConnectionFactory redisConnectionFactory() {
return new LettuceConnectionFactory(redisProperties.getHost(), redisProperties.getPort());
return new LettuceConnectionFactory(host, redisProperties.getPort());
}

@Bean
Expand Down

0 comments on commit 7f87c6a

Please sign in to comment.