Skip to content

Commit

Permalink
Merge pull request #501 from Travel-in-nanaland/feat/#499-redisConfig
Browse files Browse the repository at this point in the history
Feat/#499 redis config
  • Loading branch information
jyajoo authored Nov 8, 2024
2 parents 6338743 + 94b634f commit 2c41a59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ public class RedisConfig {
@Value("${spring.data.redis.password}")
private String password;

@Value("${spring.data.redis.database}")
private int database;

@Bean
public RedisConnectionFactory redisConnectionFactory() {
RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration();
redisStandaloneConfiguration.setHostName(host);
redisStandaloneConfiguration.setPort(port);
redisStandaloneConfiguration.setPassword(password);
redisStandaloneConfiguration.setDatabase(database);
return new LettuceConnectionFactory(redisStandaloneConfiguration);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.jeju.nanaland.global.config;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.servers.Server;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
Expand All @@ -12,7 +10,6 @@
import org.springframework.context.annotation.Configuration;

@Configuration
@OpenAPIDefinition(servers = {@Server(url = "https://nanaland.site")})
public class SwaggerConfig {

@Value("${springdoc.version}")
Expand Down

0 comments on commit 2c41a59

Please sign in to comment.