com.alibaba.boot.dubbo.DubboProperties Maven / Gradle / Ivy
package com.alibaba.boot.dubbo;
import com.alibaba.dubbo.config.ApplicationConfig;
import com.alibaba.dubbo.config.ProtocolConfig;
import com.alibaba.dubbo.config.RegistryConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
@ConfigurationProperties(prefix = "spring.dubbo")
public class DubboProperties {
private String scan = "";
//全局超时时间
private Integer timeout = 1000;
//泛化服务代理路径前缀
private String genericPrefix = "/proxy/";
@NestedConfigurationProperty
private ApplicationConfig application;
@NestedConfigurationProperty
private RegistryConfig registry;
@NestedConfigurationProperty
private ProtocolConfig protocol = new ProtocolConfig("dubbo", 20880);
public String getScan() {
return scan;
}
public ApplicationConfig getApplication() {
return application;
}
public void setApplication(ApplicationConfig application) {
this.application = application;
}
public RegistryConfig getRegistry() {
return registry;
}
public void setRegistry(RegistryConfig registry) {
this.registry = registry;
}
public ProtocolConfig getProtocol() {
return protocol;
}
public void setProtocol(ProtocolConfig protocol) {
this.protocol = protocol;
}
public void setScan(String scan) {
this.scan = scan;
}
public Integer getTimeout() {
return timeout;
}
public void setTimeout(Integer timeout) {
this.timeout = timeout;
}
public String getGenericPrefix() {
return genericPrefix;
}
public void setGenericPrefix(String genericPrefix) {
this.genericPrefix = genericPrefix;
}
}