diff --git a/docker-compose.yml b/docker-compose.yml index a830a0f..225d4c0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,7 +42,7 @@ services: container_name: redis-container image: redis:latest healthcheck: - test: [ "CMD", "redis-cli", "ping" ] + test: [ "CMD", "redis-cli", "-a", "${REDIS_PASSWORD}","ping"] interval: 10s timeout: 5s retries: 5 diff --git a/src/main/java/com/book/backend/global/RedisConfig.java b/src/main/java/com/book/backend/global/RedisConfig.java index 4cd2343..8ae345f 100644 --- a/src/main/java/com/book/backend/global/RedisConfig.java +++ b/src/main/java/com/book/backend/global/RedisConfig.java @@ -1,5 +1,6 @@ package com.book.backend.global; +import jakarta.annotation.PostConstruct; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; @@ -45,4 +46,9 @@ public RedisTemplate redisTemplate() { return redisTemplate; } + + @PostConstruct + public void test(){ + log.trace("!!!!!! RedisConfig > test() > host: {}, port: {}, password: {}", host, port, password); + } }