wuxw
2022-01-13 22fc88ee574c8ec86a143b3a2bb8ed7bac844480
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
package com.java110.config.properties.code;
 
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
 
/**
 * Created by wuxw on 2018/6/6.
 */
@Component
@ConfigurationProperties(prefix = "java110.code.zookeeper")
@PropertySource("classpath:config/code/zookeeper.properties")
public class ZookeeperProperties {
 
    private String url;
 
    private long port;
 
    private int timeOut;
 
    private String workDir;
 
    public int getTimeOut() {
        return timeOut;
    }
 
    public void setTimeOut(int timeOut) {
        this.timeOut = timeOut;
    }
 
    public String getUrl() {
        return url;
    }
 
    public void setUrl(String url) {
        this.url = url;
    }
 
    public long getPort() {
        return port;
    }
 
    public void setPort(long port) {
        this.port = port;
    }
 
    public String getZookeeperConnectString(){
        return this.url + ":" +this.port;
    }
 
    public String getWorkDir() {
        return workDir;
    }
 
    public void setWorkDir(String workDir) {
        this.workDir = workDir;
    }
}