From 736762aef8d9760daf035a3a09bdee54a078e379 Mon Sep 17 00:00:00 2001 From: soohyun <49307946+sss4920@users.noreply.github.com> Date: Sun, 11 Aug 2024 11:45:25 +0900 Subject: [PATCH 1/3] Update CD-MAIN.yml --- .github/workflows/CD-MAIN.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CD-MAIN.yml b/.github/workflows/CD-MAIN.yml index 398d48b..ced4d4b 100644 --- a/.github/workflows/CD-MAIN.yml +++ b/.github/workflows/CD-MAIN.yml @@ -2,7 +2,8 @@ name: CD on: pull_request: - branches: [ "main" ] + branches: [ "develop" ] + permissions: contents: read From 5e59ecfda5b00a256fd3c8c7c9f0e2252ee12846 Mon Sep 17 00:00:00 2001 From: soohyun <49307946+sss4920@users.noreply.github.com> Date: Sun, 11 Aug 2024 11:46:49 +0900 Subject: [PATCH 2/3] Update CD-MAIN.yml --- .github/workflows/CD-MAIN.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CD-MAIN.yml b/.github/workflows/CD-MAIN.yml index ced4d4b..171284c 100644 --- a/.github/workflows/CD-MAIN.yml +++ b/.github/workflows/CD-MAIN.yml @@ -1,8 +1,9 @@ name: CD on: - pull_request: - branches: [ "develop" ] + push: + branches: + - develop permissions: contents: read From 73c0d76a8152911137113d0ce16b346540842d4b Mon Sep 17 00:00:00 2001 From: soohyun Date: Sun, 11 Aug 2024 11:49:55 +0900 Subject: [PATCH 3/3] =?UTF-8?q?#50=20feature:=20redis=20config=EB=A1=9C=20?= =?UTF-8?q?cd=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../global/cache/ShortUrlRedisRepository.java | 8 +++++++ .../global/config/RedisCacheConfig.java | 23 +++++++++++++++++++ .../global/dto/ShortUrlReponseDto.java | 4 ++++ 3 files changed, 35 insertions(+) create mode 100644 neighbor/src/main/java/com/likelion/neighbor/global/cache/ShortUrlRedisRepository.java create mode 100644 neighbor/src/main/java/com/likelion/neighbor/global/config/RedisCacheConfig.java create mode 100644 neighbor/src/main/java/com/likelion/neighbor/global/dto/ShortUrlReponseDto.java diff --git a/neighbor/src/main/java/com/likelion/neighbor/global/cache/ShortUrlRedisRepository.java b/neighbor/src/main/java/com/likelion/neighbor/global/cache/ShortUrlRedisRepository.java new file mode 100644 index 0000000..7d9035e --- /dev/null +++ b/neighbor/src/main/java/com/likelion/neighbor/global/cache/ShortUrlRedisRepository.java @@ -0,0 +1,8 @@ +package com.likelion.neighbor.global.cache; + +import org.springframework.data.repository.CrudRepository; + +import com.likelion.neighbor.global.dto.ShortUrlReponseDto; + +public interface ShortUrlRedisRepository extends CrudRepository { +} diff --git a/neighbor/src/main/java/com/likelion/neighbor/global/config/RedisCacheConfig.java b/neighbor/src/main/java/com/likelion/neighbor/global/config/RedisCacheConfig.java new file mode 100644 index 0000000..93eb47b --- /dev/null +++ b/neighbor/src/main/java/com/likelion/neighbor/global/config/RedisCacheConfig.java @@ -0,0 +1,23 @@ +package com.likelion.neighbor.global.config; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; + +@Configuration +public class RedisCacheConfig { + + @Value("${spring.data.redis.host") + private String host; + + @Value("${spring.data.redis.port") + private int port; + + @Bean + public RedisConnectionFactory redisConnectionFactory(){return new LettuceConnectionFactory(host,port); + } + +} diff --git a/neighbor/src/main/java/com/likelion/neighbor/global/dto/ShortUrlReponseDto.java b/neighbor/src/main/java/com/likelion/neighbor/global/dto/ShortUrlReponseDto.java new file mode 100644 index 0000000..a56e3ca --- /dev/null +++ b/neighbor/src/main/java/com/likelion/neighbor/global/dto/ShortUrlReponseDto.java @@ -0,0 +1,4 @@ +package com.likelion.neighbor.global.dto; + +public class ShortUrlReponseDto { +}