关于DUBBO微服务的方法参数类型及方法参数的配置方式,请参见以下示例。

方法 参数类型填写方式 参数填写方式
String sayHello(String name); ["java.lang.String"] ["hello, dubbo"]
String helloBean(HelloBean helloBean); ["com.alibaba.pts.dubbo.api.DemoService"] [{"booleanValue":true,"helloSubValue":{"booleanValue":false,"intValue":2,"stringValue":"subbean"},"intValue":1,"stringValue":"bean"}]
String helloBean(HelloBean helloBean1, HelloBean helloBean2); ["com.alibaba.pts.dubbo.api.DemoService","com.alibaba.pts.dubbo.api.DemoService"] [{"booleanValue":true,"helloSubValue":{"booleanValue":false,"intValue":2,"stringValue":"subbean"},"intValue":1,"stringValue":"bean"},{"booleanValue":true,"helloSubValue":{"booleanValue":false,"intValue":2,"stringValue":"subbean"},"intValue":1,"stringValue":"bean"}]
String helloMap(Map helloMap); ["java.util.Map"] [{"booleanValue":true,"helloSubValue":{"booleanValue":false,"intValue":2,"stringValue":"subbean"},"intValue":1,"stringValue":"bean"}]
String helloMap(Map helloMap1, Map helloMap2); ["java.util.Map", "java.util.Map"] [{"booleanValue":true,"helloSubValue":{"booleanValue":false,"intValue":2,"stringValue":"subbean"},"intValue":1,"stringValue":"bean"},{"booleanValue":true,"helloSubValue":{"booleanValue":false,"intValue":2,"stringValue":"subbean"},"intValue":1,"stringValue":"bean"}]
String helloList(List helloList); ["java.util.List"] [[1]]
String helloList(List helloList1, List helloList2); ["java.util.List","java.util.List"] [[1],[1,2]]
String helloString(String helloString); ["java.lang.String"] [[1],[1,2],[1,3]]
String helloString(String helloString1, String helloString2); ["java.lang.String","java.lang.String"] ["hello, dubbo", "hello, dubbo"]
String helloInt(int helloInt); ["int"] ["hello, dubbo", "hello, dubbo"]
String helloInt(int helloInt1, int helloInt2); ["int","int"] ["1","2"]
String helloBoolean(boolean helloBoolean); ["boolean"] ["true"]
String helloBoolean(boolean helloBoolean1, boolean helloBoolean2); ["boolean","boolean"] ["true","false"]
String helloVoid(); [] []

更多信息

使用 Dubbo 插件遇到的相关问题,请参见Dubbo 常见问题