Skip to content

Commit

Permalink
Merge pull request #55 from sss4920/feature/#50
Browse files Browse the repository at this point in the history
#50 feature: redis config로 cd테스트
  • Loading branch information
sss4920 authored Aug 11, 2024
2 parents 60b651d + 73c0d76 commit 0002a30
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
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 {
}

0 comments on commit 0002a30

Please sign in to comment.