目录
1、先建一个普通的springmvc项目
2、然后对其进行改造-dubbo-service
2.1、@Service应用包改为dubbo
2.2、resources/spring/applicationContext.xml
2.3、webapp加入
3、然后对其进行改造-dubbo-web
3.1、首先把dubbo-service中的接口提出来
3.2、dubbo-service和dubbo-web引用
3.3、远程注入
3.4、srcmainresourcesspringspringmvc.xml
3.5、删除web.xml-spring配置
3.6、报错处理
4、dubbo-admin部署安装
1、先建一个普通的springmvc项目
2、然后对其进行改造-dubbo-service
注:本案例中zookeeper版本为3.5.6
5.1.9.RELEASE 2.7.4.1 4.0.0 1.8 org.apache.dubbo dubbo${dubbo.version} org.apache.curator curator-framework${zookeeper.version} org.apache.curator curator-recipes${zookeeper.version}
把dubbo-service从jar项目改为war项目
war
具体步骤:
2.1、@Service应用包改为dubbo
2.2、resources/spring/applicationContext.xml
注意
2.3、webapp加入
这是个web项目,那就要加入webapp
把springmvc的项关配置删掉,仅留spring配置:
contextConfigLocation classpath*:spring/applicationContext*.xml org.springframework.web.context.ContextLoaderListener
启动项目
3、然后对其进行改造-dubbo-web
3.1、首先把dubbo-service中的接口提出来
3.2、dubbo-service和dubbo-web引用
com.steven
dubbo-interface
1.0-SNAPSHOT
3.3、远程注入
3.4、srcmainresourcesspringspringmvc.xml
3.5、删除web.xml-spring配置
3.6、报错处理
4、dubbo-admin部署安装
如果要加入元数据配置,在dubbo-service中配置:
效果:



