Redis connection 수정
This commit is contained in:
		| @@ -1,6 +1,5 @@ | ||||
| package kr.co.vividnext.sodalive.configs | ||||
|  | ||||
| import io.lettuce.core.ClientOptions | ||||
| import org.springframework.beans.factory.annotation.Value | ||||
| import org.springframework.cache.annotation.EnableCaching | ||||
| import org.springframework.context.annotation.Bean | ||||
| @@ -29,20 +28,12 @@ class RedisConfig( | ||||
| ) { | ||||
|     @Bean | ||||
|     fun redisConnectionFactory(): RedisConnectionFactory { | ||||
|         val clientOptions = ClientOptions.builder() | ||||
|             .pingBeforeActivateConnection(true) | ||||
|             .autoReconnect(true) | ||||
|             .build() | ||||
|  | ||||
|         val clientConfig = LettuceClientConfiguration.builder() | ||||
|             .clientOptions(clientOptions) | ||||
|             .commandTimeout(Duration.ofSeconds(5)) | ||||
|             .shutdownTimeout(Duration.ofSeconds(5)) | ||||
|         val clientConfiguration = LettuceClientConfiguration.builder() | ||||
|             .useSsl() | ||||
|             .disablePeerVerification() | ||||
|             .build() | ||||
|  | ||||
|         return LettuceConnectionFactory(RedisStandaloneConfiguration(host, port), clientConfig) | ||||
|         return LettuceConnectionFactory(RedisStandaloneConfiguration(host, port), clientConfiguration) | ||||
|     } | ||||
|  | ||||
|     @Bean | ||||
|   | ||||
		Reference in New Issue
	
	Block a user