Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xyz327/dubbo-example

dubbo example
https://github.com/xyz327/dubbo-example

Last synced: about 1 month ago
JSON representation

dubbo example

Awesome Lists containing this project

README

        

# dubbo-example
dubbo example

由于要切换到apache的原因 dubbo的spring的xml文件的xsd schema属性有所变化,配置不对时spring启动时会报错
```
BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://dubbo.apache.org/schema/dubbo]
```
> 2.6.1
```xml

```
> 2.6.1之后
```xml

```

## xml 属性

|标签名|说明|
|:----:|:---:|
|[dubbo:application](./doc/application.md) | 配置当前应用信息,不管该应用是提供者还是消费者|
|[dubbo:protocol](./doc/protocol.md) | 配置提供服务的协议信息,协议由提供方指定,消费方被动接受|
|[dubbo:registry](./doc/registry.md)| 用于配置连接注册中心相关信息|


## 方法参数回调
> 接口
```java
public interface CallbackService {
void callback(String mag, Consumer callback);
}
```
> 服务提供者
```java
public class CallbackServiceImpl implements CallbackService {
@Override
public void callback(String msg, Consumer callback) {
callback.accept(msg+"---"+System.currentTimeMillis());
}
}
```
```xml








```
> 服务消费者
```xml

```