yangyang
2025-03-21 8edc8701512d6a02492c8f8d38c05a4253650117
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package com.vincent.rsf.server.common.config;
 
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
 
import java.net.InetAddress;
import java.net.UnknownHostException;
 
/**
 * redis系统配置
 * Created by vincent on 2018/10/15
 */
@Configuration
@ConfigurationProperties(prefix = "redis")
public class RedisProperties {
 
    public static String HOST_NAME;
 
    static {
        try {
            HOST_NAME = InetAddress.getLocalHost().getHostName();
        } catch (UnknownHostException e) {
            System.err.println("find hostname err");
        }
    }
 
    private String host;
 
    private String password;
 
    private int port;
 
    private int min;
 
    private int max;
 
    private int timeout;
 
    private int index;
 
    public String getHost() {
        return host;
    }
 
    public void setHost(String host) {
        this.host = host;
    }
 
    public String getPassword() {
        return password;
    }
 
    public void setPassword(String password) {
        this.password = password;
    }
 
    public int getPort() {
        return port;
    }
 
    public void setPort(int port) {
        this.port = port;
    }
 
    public int getMin() {
        return min;
    }
 
    public void setMin(int min) {
        this.min = min;
    }
 
    public int getMax() {
        return max;
    }
 
    public void setMax(int max) {
        this.max = max;
    }
 
    public int getTimeout() {
        return timeout;
    }
 
    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }
 
    public int getIndex() {
        return index;
    }
 
    public void setIndex(int index) {
        this.index = index;
    }
}