In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to connect the Fizz Gateway gateway to the Dubbo". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to connect the Fizz Gateway gateway to the Dubbo".
# prerequisites
Fizz Gateway v1.5.0 or above (installation tutorial (opens new window))
Dubbo service
Dubbo's zookeeper registry
The API used later in this document is findById, which echoes the ID and name fields of the input parameters. The JSON is as follows:
{"name": "call findById", "id": "input parameter ID"} # configure zookeeper address
Configure the registry zookeeper of the dubbo service, modify the configuration file application.yml, type the following configuration item, and replace it with the actual zookeeper address
Fizz-dubbo-client: address: zookeeper://127.0.0.1:2181# services and interface maintenance
Although the Dubbo service is registered with the service registry, it only contains the information of the service instance and does not contain the information of the interface level, so it is necessary to maintain the interface of the Dubbo service centrally to facilitate multiple calls in the service orchestration.
Go to the Fizz Management backend, open RPC Management-> Service Management, and click add to enter information such as service name.
Open RPC Management-> Interface Management, and click add to input the interfaces you need into the system. The interfaces that are not used can not be entered.
The field name format of the parameter of Dubbo method is pN, for example, the first parameter is p1, and the second parameter is p2. If the parameter is an object and you want to specify the value of an attribute in the object, enter pN. [attrName], such as: p1.userID _ attrName. For more information on parameter configuration, please see the document: (service orchestration-data conversion (opens new window))
Save Interfac
# configure routing
Open Gateway Management-> Route Management, and click add to configure the following routes
# publish
Service orchestration interface needs to be released to provide services. Open choreography Review-> my application, add a new release application, and select the Super Admin as the auditor in order to facilitate the operation.
Open my application and click the view action of the application form:
# access the official API
Access http://[ Gateway IP]: 8600/proxy/func-test/user/findById?id=666
Thank you for your reading. The above is the content of "how to connect the Fizz Gateway gateway to the Dubbo". After the study of this article, I believe you have a deeper understanding of how to access the Fizz Gateway gateway to the Dubbo, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.