Skip to content

Commit

Permalink
fix: spring.data.redis.redisson -> spring.data.redisson
Browse files Browse the repository at this point in the history
  • Loading branch information
kimyu0218 committed Nov 18, 2024
1 parent 7bd824b commit 582d6e1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

import java.io.IOException;

@ConditionalOnProperty(name = "spring.data.redis.redisson.enabled", havingValue = "true")
@ConditionalOnProperty(name = "spring.data.redisson.enabled", havingValue = "true")
@Configuration
public class RedissonConfig {

@Value("${spring.data.redis.redisson.file}")
@Value("${spring.data.redisson.file}")
private Resource redissonConfigFile;

@Bean
public RedissonClient redissonClient() throws IOException {
Config config = Config.fromYAML(redissonConfigFile.getInputStream());

return Redisson.create(config);
}
}
6 changes: 3 additions & 3 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ spring:
redis:
host: localhost
port: 6379
redisson:
enabled: true
file: classpath:redisson-config.yml
redisson:
enabled: true
file: classpath:redisson-config.yml
servlet:
multipart:
max-file-size: 5MB
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.nexters.goalpanzi.infrastructure.aws;

import com.nexters.goalpanzi.config.redis.RedisInitializer;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.web.multipart.MultipartFile;

import static com.nexters.goalpanzi.fixture.MissionFixture.IMAGE_FILE;
Expand All @@ -14,9 +12,6 @@
import static org.mockito.Mockito.when;

@SpringBootTest
@ContextConfiguration(
initializers = {RedisInitializer.class}
)
class S3ClientTest {

@MockBean
Expand Down
5 changes: 2 additions & 3 deletions src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ spring:
highlight_sql: true
open-in-view: false
data:
redis:
redisson:
enabled: false
redisson:
enabled: false
flyway:
enabled: false

Expand Down

0 comments on commit 582d6e1

Please sign in to comment.