You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/18 10:48:44 UTC
[GitHub] [dubbo-go-samples] PhilYue commented on pull request #251: Ftr: rest sample using dubbogo.yml
PhilYue commented on pull request #251:
URL: https://github.com/apache/dubbo-go-samples/pull/251#issuecomment-922257808
错误现象:启动 Rest Sample 时报错
错误代码:
[rest_protocol.go](https://github.com/apache/dubbo-go/blob/config-enhance/protocol/rest/rest_protocol.go)
```
// Export export rest service
func (rp *RestProtocol) Export(invoker protocol.Invoker) protocol.Exporter {
url := invoker.GetURL()
serviceKey := url.ServiceKey()
exporter := NewRestExporter(serviceKey, invoker, rp.ExporterMap())
id := url.GetParam(constant.BEAN_NAME_KEY, "")
// error :此处获取 rest config 为空
restServiceConfig := rest_config.GetRestProviderServiceConfig(id)
if restServiceConfig == nil {
logger.Errorf("%s service doesn't has provider config", url.Path)
return nil
}
rp.SetExporterMap(serviceKey, exporter)
restServer := rp.getServer(url, restServiceConfig.Server)
for _, methodConfig := range restServiceConfig.RestMethodConfigsMap {
restServer.Deploy(methodConfig, server.GetRouteFunc(invoker, methodConfig))
}
return exporter
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org