Soul網關插件之Sofa

關於sofa代理的插件,從開始就碰到了問題。

  • 以爲可以類似於之前的http一樣直接啓動就可以了,沒想到還是有問題。需要在soul-bootstrap中加入 sofa插件的依賴
<dependency>
           <groupId>com.alipay.sofa</groupId>
           <artifactId>sofa-rpc-all</artifactId>
           <version>5.7.6</version>
       </dependency>
       <dependency>
           <groupId>org.apache.curator</groupId>
           <artifactId>curator-client</artifactId>
           <version>4.0.1</version>
       </dependency>
       <dependency>
           <groupId>org.apache.curator</groupId>
           <artifactId>curator-framework</artifactId>
           <version>4.0.1</version>
       </dependency>
       <dependency>
           <groupId>org.apache.curator</groupId>
           <artifactId>curator-recipes</artifactId>
           <version>4.0.1</version>
       </dependency>
       <dependency>
           <groupId>org.dromara</groupId>
           <artifactId>soul-spring-boot-starter-plugin-sofa</artifactId>
           <version>${last.version}</version>
       </dependency>

添加了之後,開啓sofa插件,後臺仍然出現錯誤
file
file
斷點調試之後,發現
file
檢查選擇器無法選擇到的錯誤是在檢查divide,springcloud和dubbo中產生的。
在soul-bootstrap中已引入了許多插件的代碼爲什麼soul插件需要單獨引入。
在多次嘗試沒有成功之後,重新拉取代碼。刪除原有的創建的soul數據庫,按照先啓動soul-admin,開啓sofa插件。soul-bootstrap啓動,sofa插件示例項目啓動的順序進行操作,sofa插件成功註冊到soul網關中。在瀏覽器中直接訪問端口測試正常
file

推測之前產生問題的原因

  • 數據庫因爲某項操作產生了髒數據。
  • 更改了配置的問題。

使用拉取最新代碼之前的代碼使用新庫重新操作。正常執行。目前推測還是數據庫操作有髒數據
所以給自己作爲一個初學者的建議還是要規範操作,按順序來,多參閱文檔和其他人的經驗,實在不行儘快轉換思路使用基礎的配置

歡迎搜索關注本人與朋友共同開發的微信面經小程序【大廠面試助手】和公衆號【微瞰技術】,以及總結的分類面試題https://github.com/zhendiao/JavaInterview

file
file

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章