DubboxProperties.java
3.94 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
package com.uccc.dubbox;
import com.alibaba.dubbo.config.*;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Dubbox配置
*
* Created by caoliang on 2017/7/24.
*/
@ConfigurationProperties(prefix = "dubbox")
public class DubboxProperties {
public DubboxProperties() {
this.service = new ServiceConfig();
this.reference = new ReferenceConfig();
this.protocol = new ProtocolConfig();
this.application = new ApplicationConfig();
this.module = new ModuleConfig();
this.registry = new RegistryConfig();
this.monitor = new MonitorConfig();
this.provider = new ProviderConfig();
this.method = new MethodConfig();
this.argument = new ArgumentConfig();
}
/**
* 服务配置,用于暴露一个服务,定义服务的元信息,一个服务可以用多个协议暴露,一个服务也可以注册到多个注册中心。(使用注解代替!)
*/
protected ServiceConfig service;
/**
* 引用配置,用于创建一个远程服务代理,一个引用可以指向多个注册中心。(使用注解代替!)
*/
protected ReferenceConfig reference;
/**
* 协议配置,用于配置提供服务的协议信息,协议由提供方指定,消费方被动接受。
*/
protected ProtocolConfig protocol;
/**
* 应用配置,用于配置当前应用信息,不管该应用是提供者还是消费者。
*/
protected ApplicationConfig application;
/**
* 模块配置,用于配置当前模块信息,可选。
*/
protected ModuleConfig module;
/**
* 注册中心配置,用于配置连接注册中心相关信息。
*/
protected RegistryConfig registry;
/**
* 监控中心配置,用于配置连接监控中心相关信息,可选。
*/
protected MonitorConfig monitor;
/**
* 提供方的缺省值,当ProtocolConfig和ServiceConfig某属性没有配置时,采用此缺省值,可选。
*/
protected ProviderConfig provider;
/**
* 方法配置,用于ServiceConfig和ReferenceConfig指定方法级的配置信息。
*/
protected MethodConfig method;
/**
* 用于指定方法参数配置。
*/
protected ArgumentConfig argument;
public ServiceConfig getService() {
return service;
}
public void setService(ServiceConfig service) {
this.service = service;
}
public ReferenceConfig getReference() {
return reference;
}
public void setReference(ReferenceConfig reference) {
this.reference = reference;
}
public ProtocolConfig getProtocol() {
return protocol;
}
public void setProtocol(ProtocolConfig protocol) {
this.protocol = protocol;
}
public ApplicationConfig getApplication() {
return application;
}
public void setApplication(ApplicationConfig application) {
this.application = application;
}
public ModuleConfig getModule() {
return module;
}
public void setModule(ModuleConfig module) {
this.module = module;
}
public RegistryConfig getRegistry() {
return registry;
}
public void setRegistry(RegistryConfig registry) {
this.registry = registry;
}
public MonitorConfig getMonitor() {
return monitor;
}
public void setMonitor(MonitorConfig monitor) {
this.monitor = monitor;
}
public ProviderConfig getProvider() {
return provider;
}
public void setProvider(ProviderConfig provider) {
this.provider = provider;
}
public MethodConfig getMethod() {
return method;
}
public void setMethod(MethodConfig method) {
this.method = method;
}
public ArgumentConfig getArgument() {
return argument;
}
public void setArgument(ArgumentConfig argument) {
this.argument = argument;
}
}