Skip to content

Commit

Permalink
[release] RedisConfig postConstruct log
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeesw committed Sep 15, 2024
1 parent 6b078db commit 5ff05c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/book/backend/global/RedisConfig.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -45,4 +46,9 @@ public RedisTemplate<String, String> redisTemplate() {

return redisTemplate;
}

@PostConstruct
public void test(){
log.trace("!!!!!! RedisConfig > test() > host: {}, port: {}, password: {}", host, port, password);
}
}

0 comments on commit 5ff05c0

Please sign in to comment.