增加项目README.md
This commit is contained in:
@ -4,7 +4,7 @@ import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatche
|
||||
|
||||
/**
|
||||
* @author : heibaiying
|
||||
* @description : 前端过滤器配置
|
||||
* @description : 前端控制器配置
|
||||
*/
|
||||
public class DispatcherServletInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
|
||||
|
||||
|
@ -14,6 +14,9 @@ import org.springframework.context.annotation.Configuration;
|
||||
@Configuration
|
||||
public class DubboConfiguration {
|
||||
|
||||
/**
|
||||
* 消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方一样
|
||||
*/
|
||||
@Bean
|
||||
public ApplicationConfig applicationConfig() {
|
||||
ApplicationConfig applicationConfig = new ApplicationConfig();
|
||||
@ -21,6 +24,10 @@ public class DubboConfiguration {
|
||||
return applicationConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置调用服务超时时间
|
||||
* 关闭所有服务的启动时检查
|
||||
*/
|
||||
@Bean
|
||||
public ConsumerConfig consumerConfig() {
|
||||
ConsumerConfig consumerConfig = new ConsumerConfig();
|
||||
@ -29,6 +36,9 @@ public class DubboConfiguration {
|
||||
return consumerConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用zookeeper注册中心暴露发现服务地址
|
||||
*/
|
||||
@Bean
|
||||
public RegistryConfig registryConfig() {
|
||||
RegistryConfig registryConfig = new RegistryConfig();
|
||||
@ -37,11 +47,4 @@ public class DubboConfiguration {
|
||||
return registryConfig;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ProtocolConfig protocolConfig() {
|
||||
ProtocolConfig protocolConfig = new ProtocolConfig();
|
||||
protocolConfig.setName("dubbo");
|
||||
protocolConfig.setPort(20880);
|
||||
return protocolConfig;
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* @author : heibaiying
|
||||
* @description :
|
||||
* @description :消费服务
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("sell")
|
||||
|
Reference in New Issue
Block a user