1)导入dubbo-stater,在application.properties中配置属性,使用@Servcie注解暴露服务,使用@Reference引用服务。@EnableDubbo注解(开启dubbo功能)与dubbo.scan.base-packages=com.moon功能相同
2)导入dubbo-stater,在provider.xml中配置属性,使用@ImportResource(locations="classpath:provider.xml")
3)使用注解api方式。