Add related dependencies and enable plugin, please refer to: Quick start with Sofa .
Sofa client access, please refer to: Sofa Proxy .
Set selector and rule, please refer to: Selector And Rule Config .
Each sofa interface method, will correspond to a metadata, when the sofa application client access to the ShenYu gateway, will be automatically registered, can be viewed in the shenyu-admin background management system of the BasicConfig --> Metadata management.
AppName: specifies the name of the application to which the metadata belongs.
MethodName: the name of the method to call.
Path: http request path.
PathDescribe: the description of the path is easy to view.
ParamsType: the parameters are separated by commas (,) in the order of interface parameter types.
RpcExpand: other configurations of the sofa interface, which support the JSON format, are as follows:
{"loadbalance":"hash","retries":3,"timeout":-1}
Interface: The fully qualified class name of the sofa interface.
RpcType:choose sofa.