Skip to content

Commit

Permalink
fix: redis primary
Browse files Browse the repository at this point in the history
  • Loading branch information
minseokey committed Nov 24, 2024
1 parent 52a307e commit d890df6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/flowerd/backend/config/RedisConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
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;
import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
import org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration;
Expand All @@ -24,6 +25,7 @@ public class RedisConfig {

// Reactive Redis 연결 설정
@Bean
@Primary
public ReactiveRedisConnectionFactory reactiveRedisConnectionFactory1() {
RedisStandaloneConfiguration redisConfig = new RedisStandaloneConfiguration();
redisConfig.setDatabase(0);
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ spring:
host: redis
port: 6379

autoconfigure:
exclude: org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration
# autoconfigure:
# exclude: org.springframework.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration

mail:
host: smtp.gmail.com
Expand Down

0 comments on commit d890df6

Please sign in to comment.