Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#50 feature: redis config로 cd테스트 #51

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/CD-MAIN.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: CD

on:
pull_request:
branches: [ "main" ]
push:
branches:
- develop

permissions:
contents: read

Expand Down
Original file line number Diff line number Diff line change
@@ -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<ShortUrlReponseDto, String> {
}
Original file line number Diff line number Diff line change
@@ -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);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.likelion.neighbor.global.dto;

public class ShortUrlReponseDto {
}
Loading