Skip to content
HiMarket 开源,打造开箱即用的 AI 开放平台Know more

HTTP to Dubbo Configuration Guide

This document describes the configuration options for the Http2Rpc Custom Resource Definition (CRD).

spec.dubbo

FieldTypeDescriptionExample
servicestringDubbo interface namee.g., “com.alibaba.nacos.example.dubbo.service.DemoService”
versionstringDubbo service versione.g., “1.0.0”
groupstringDubbo service groupe.g., “dev”
methods[]MethodList of method mapping rules

spec.dubbo.methods

FieldTypeDescriptionExample
serviceMethodstringMethod name of the Dubbo service interfacee.g., “sayName”
headersAttachstringHTTP headers to be passed through1. Empty: No headers will be passed
2. ”*”: All headers will be passed
3. Comma-separated list of header keys: header-A,header-B,header-C
httpPathstringHTTP path bound to the serviceMethode.g., “/dubbo/hello”
httpMethods[]HTTP_METHOD_TYPEHTTP methods allowed for the httpPathe.g., [“POST”]
params[]ParamParameter extraction configuration
paramFromEntireBodyParamFromEntireBodyUse the entire request body as a parameter. If both paramFromEntireBody and params are configured, the params field will be ignored

spec.dubbo.methods.params

FieldTypeDescriptionExample
paramKeystringParameter namee.g., “p”
paramSourcePARAM_SOURCE_TYPEParameter sourcee.g., “QUERY”
paramTypestringParameter type for the Dubbo methode.g., “java.lang.String”

spec.dubbo.methods.paramFromEntireBody

FieldTypeDescriptionExample
paramTypestringParameter type for the Dubbo methode.g., “java.lang.String”

HTTP_METHOD_TYPE

ValueDescription
GETHTTP GET method
POSTHTTP POST method
PUTHTTP PUT method
DELETEHTTP DELETE method
PATCHHTTP PATCH method

PARAM_SOURCE_TYPE

ValueDescription
QUERYHTTP URL query parameters
HEADERHTTP headers
PATHHTTP URL path variables
BODYHTTP request body