Commit 4a31f245 authored by tianbo's avatar tianbo

Merge branch 'develop_tzs' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_tzs

parents c56532ce 492dc867
package com.yeejoin.amos.boot.module.ymt.biz.config;
import lombok.extern.slf4j.Slf4j;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@Slf4j
public class RedissonManager {
//集群环境使用
@Value("${spring.redis.cluster.nodes}")
private String clusterNodes;
//通用
@Value("${spring.redis.password}")
private String password;
@Bean
public RedissonClient redissonClient() {
log.info("clusterNodes{}",clusterNodes);
log.info("password{}",password);
Config config = new Config();
config.useClusterServers()
.addNodeAddress(clusterNodes.split(","))
.setPassword(password);
return Redisson.create(config);
}
}
......@@ -68,7 +68,11 @@
<artifactId>amos-component-security</artifactId>
<version>${amos.version.tzs}</version>
</dependency>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>2.7.0</version>
</dependency>
</dependencies>
<dependencyManagement>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment