Skip to content

Commit

Permalink
[OING-294] refactor: 캐싱 기능 및 Redis 설정 파일 삭제 (#218)
Browse files Browse the repository at this point in the history
* feature: delete redis file and caching logic

* feature: delete redis env value

* test: delete redis file in test

* chore: delete library related to redis
  • Loading branch information
Ji-soo708 authored and CChuYong committed Apr 2, 2024
1 parent 3bb028a commit 1d36a8a
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 307 deletions.
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,9 @@ subprojects {
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'com.google.firebase:firebase-admin:9.2.0'
implementation 'com.google.api-client:google-api-client:1.32.1'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.3'
implementation 'net.javacrumbs.shedlock:shedlock-spring:5.10.0'
implementation 'net.javacrumbs.shedlock:shedlock-provider-jdbc-template:5.10.0'
implementation 'it.ozimov:embedded-redis:0.7.2'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
implementation("com.nimbusds:nimbus-jose-jwt:9.37")
Expand Down

This file was deleted.

42 changes: 0 additions & 42 deletions gateway/src/main/java/com/oing/config/redis/RedisCacheConfig.java

This file was deleted.

44 changes: 0 additions & 44 deletions gateway/src/main/java/com/oing/config/redis/RedisConfig.java

This file was deleted.

40 changes: 0 additions & 40 deletions gateway/src/main/java/com/oing/config/redis/RedisLocalConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.oing.service.PostService;
import com.oing.util.OptimizedImageUrlGenerator;
import lombok.RequiredArgsConstructor;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Controller;

import java.time.LocalDate;
Expand All @@ -32,7 +31,6 @@ public class CalendarController implements CalendarApi {


@Override
@Cacheable(value = "calendarCache", key = "#familyId.concat(':').concat(#yearMonth)", cacheManager = "monthlyCalendarCacheManager")
public ArrayResponse<CalendarResponse> getMonthlyCalendar(String yearMonth, String familyId) {
if (yearMonth == null) yearMonth = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM"));

Expand Down
4 changes: 0 additions & 4 deletions gateway/src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ spring:
h2:
console:
enabled: false
data:
redis:
host: ${REDIS_HOST}
port: ${REDIS_PORT}

management:
endpoints:
Expand Down
4 changes: 0 additions & 4 deletions gateway/src/main/resources/application-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ spring:
h2:
console:
enabled: false
data:
redis:
host: ${REDIS_HOST}
port: ${REDIS_PORT}

logging:
pattern:
Expand Down
6 changes: 0 additions & 6 deletions gateway/src/main/resources/application-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ spring:
format_sql: false
dialect: org.hibernate.dialect.MySQL8Dialect
database-platform: org.hibernate.dialect.MySQL8Dialect
data:
redis:
host: localhost
port: 16379
ssl:
enabled: true

app:
external-urls:
Expand Down
9 changes: 0 additions & 9 deletions gateway/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ spring:
enabled: true
settings:
web-allow-others: true
data:
redis:
host: ${REDIS_HOST}
port: ${REDIS_PORT}
lettuce:
pool:
max-active: 16
min-idle: 8
max-idle: 10

app:
oauth:
Expand Down
4 changes: 0 additions & 4 deletions gateway/src/main/resources/template-application-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ spring:
enabled: true
show_sql: true
format_sql: true
data:
redis:
host: ${REDIS_HOST} # Must Be Replaced
port: ${REDIS_PORT} # Must Be Replaced

app:
oauth:
Expand Down
7 changes: 0 additions & 7 deletions gateway/src/test/java/com/oing/restapi/CalendarApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import com.oing.dto.response.DeepLinkResponse;
import com.oing.dto.response.FamilyResponse;
import com.oing.service.*;
import com.oing.support.EmbeddedRedisConfig;
import com.oing.support.RedisTestConfig;
import jakarta.persistence.EntityManager;
import jakarta.transaction.Transactional;
import org.junit.jupiter.api.BeforeEach;
Expand All @@ -18,8 +16,6 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Import;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.MediaType;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.ActiveProfiles;
Expand All @@ -34,7 +30,6 @@


@SpringBootTest
@Import({EmbeddedRedisConfig.class, RedisTestConfig.class})
@ActiveProfiles("test")
@Transactional
@AutoConfigureMockMvc
Expand All @@ -59,8 +54,6 @@ class CalendarApiTest {
private DeepLinkService deepLinkService;
@Autowired
private TokenGenerator tokenGenerator;
@Autowired
private RedisTemplate<String, Object> redisTemplate;

private String TEST_MEMBER1_ID;
private String TEST_MEMBER1_TOKEN;
Expand Down
4 changes: 0 additions & 4 deletions gateway/src/test/java/com/oing/restapi/PostApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@
import com.oing.repository.PostRepository;
import com.oing.repository.MemberRepository;
import com.oing.service.TokenGenerator;
import com.oing.support.EmbeddedRedisConfig;
import com.oing.support.RedisTestConfig;
import jakarta.transaction.Transactional;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Import;
import org.springframework.http.MediaType;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.web.servlet.MockMvc;
Expand All @@ -31,7 +28,6 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

@SpringBootTest
@Import({EmbeddedRedisConfig.class, RedisTestConfig.class})
@Transactional
@ActiveProfiles("test")
@AutoConfigureMockMvc
Expand Down
44 changes: 0 additions & 44 deletions gateway/src/test/java/com/oing/support/EmbeddedRedisConfig.java

This file was deleted.

Loading

0 comments on commit 1d36a8a

Please sign in to comment.