Skip to content

Commit

Permalink
Merge pull request #71 from Soongsil-CoffeeChat/dev
Browse files Browse the repository at this point in the history
redis config: add secrets
  • Loading branch information
KimKyoHwee authored Jul 17, 2024
2 parents 6893a55 + 0dfa424 commit 0d4916d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.soongsil.CoffeeChat.config.redis;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
Expand All @@ -10,10 +11,16 @@

@Configuration
public class RedisConfig {
@Value("${spring.redis.host}")
private String redisHost;

@Value("${spring.redis.port}")
private int redisPort;

@Bean
public RedisConnectionFactory redisConnectionFactory() {
return new LettuceConnectionFactory();
LettuceConnectionFactory lettuceConnectionFactory = new LettuceConnectionFactory(redisHost, redisPort);
return lettuceConnectionFactory;
}

@Bean
Expand Down

0 comments on commit 0d4916d

Please sign in to comment.