一踊跟、對(duì)消費(fèi)方Consumer引入springmvc
(1)引入依賴(lài)jar
image.png
(2)web.xml中分別引入spring和 springmvc
image.png
(3)在WEB-INF下創(chuàng)建spring-servlet.xml
image.png
(4)創(chuàng)建applicationContext.xml的spring配置文件
image.png
(5)編寫(xiě)Controller類(lèi)DemoController
image.png
二蚀之、測(cè)試
(1)確定zookeeper啟動(dòng)
(2)確定provider的Provider類(lèi)運(yùn)行
(3)確定消費(fèi)方的打包方式為war
image.png
(4)打成war包冲杀,放置tomcat下
image.png
(5)瀏覽器訪問(wèn)測(cè)試
image.png
我是double,坐標(biāo)魔都,QQ群:692595133
如果讀完覺(jué)得有收獲的話,歡迎點(diǎn)贊加關(guān)注竖慧。
github博客: https://fukailong.github.io
版權(quán)歸作者所有,轉(zhuǎn)載請(qǐng)聯(lián)系作者獲得授權(quán)逆屡。
公眾號(hào)歡迎關(guān)注