@Service
import org.apache.dubbo.config.annotation.Service;
@Service(version = "async", protocol = "p1")
public class AsyncDemoService implements DemoService {
在类上面定义了一个@Service注解,就相当于定义了一个dubbo服务,
这个注解的作用就相当于xml
注意这个@Service注解和SpringMVC的@Service注解是两个注解.
这个@Service注解会将这个服务注册到注册中心上面去