You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2021/01/30 11:28:41 UTC

[dubbo-spi-extensions] 29/39: 新增quick start demo, 修改bug

This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch 2.7.x
in repository https://gitbox.apache.org/repos/asf/dubbo-spi-extensions.git

commit 5f91e7957e4aeead7258121cd971fb4daf1d9dba
Author: qq213539 <21...@qq.com>
AuthorDate: Thu Dec 24 13:17:47 2020 +0800

    新增quick start demo, 修改bug
---
 .../core/DubboApiDocsAnnotationScanner.java        | 19 +++---
 .../dubbo/apidocs/core/beans/ApiCacheItem.java     | 16 ++++++
 .../apidocs/core/beans/ApiParamsCacheItem.java     | 16 ++++++
 .../dubbo/apidocs/core/beans/ModuleCacheItem.java  | 16 ++++++
 .../apache/dubbo/apidocs/utils/ClassTypeUtil.java  | 16 +++---
 .../apache/dubbo/apidocs/utils/SimpleTypeImpl.java | 16 ++++++
 .../apidocs/examples/api/IQuickStartDemo.java      | 36 ++++++++++++
 .../examples/params/QuickStartRequestBean.java     | 67 ++++++++++++++++++++++
 .../examples/params/QuickStartRespBean.java        | 52 +++++++++++++++++
 .../examples-provider-sca/pom.xml                  | 12 ++++
 .../examples-provider/pom.xml                      | 13 +++++
 .../examples/api/impl/QuickStartDemoImpl.java      | 42 ++++++++++++++
 12 files changed, 304 insertions(+), 17 deletions(-)

diff --git a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/DubboApiDocsAnnotationScanner.java b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/DubboApiDocsAnnotationScanner.java
index f43cb40..717bfa5 100644
--- a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/DubboApiDocsAnnotationScanner.java
+++ b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/DubboApiDocsAnnotationScanner.java
@@ -142,7 +142,7 @@ public class DubboApiDocsAnnotationScanner implements ApplicationListener<Applic
         //Description of API return data
         apiListItem.setApiRespDec(dubboApi.responseClassDescription());
 
-        // Interface parameters and response information
+        // API details in cache, contain interface parameters and response information
         ApiCacheItem apiParamsAndResp = new ApiCacheItem();
         DubboApiDocsCache.addApiParamsAndResp(
                 moduleAnn.apiInterface().getCanonicalName() + "." + method.getName(), apiParamsAndResp);
@@ -156,6 +156,7 @@ public class DubboApiDocsAnnotationScanner implements ApplicationListener<Applic
         apiParamsAndResp.setApiDocName(dubboApi.value());
         apiParamsAndResp.setApiVersion(dubboApi.version());
         apiParamsAndResp.setApiRespDec(dubboApi.responseClassDescription());
+        apiParamsAndResp.setDescription(dubboApi.description());
         apiParamsAndResp.setApiModelClass(moduleCacheItem.getModuleClassName());
         apiParamsAndResp.setParams(paramList);
         apiParamsAndResp.setResponse(ClassTypeUtil.calss2Json(method.getGenericReturnType(), method.getReturnType()));
@@ -265,28 +266,28 @@ public class DubboApiDocsAnnotationScanner implements ApplicationListener<Applic
         boolean hasAllowableValues = (param.getAllowableValues() != null && param.getAllowableValues().length > 0);
         // Processed or not
         boolean processed = false;
-        if (Integer.class.isAssignableFrom(classType)) {
+        if (Integer.class.isAssignableFrom(classType) || int.class.isAssignableFrom(classType)) {
             param.setHtmlType(HtmlTypeEnum.NUMBER_INTEGER);
             processed = true;
-        } else if (Byte.class.isAssignableFrom(classType)) {
+        } else if (Byte.class.isAssignableFrom(classType) || byte.class.isAssignableFrom(classType)) {
             param.setHtmlType(HtmlTypeEnum.TEXT_BYTE);
             processed = true;
-        } else if (Long.class.isAssignableFrom(classType)) {
+        } else if (Long.class.isAssignableFrom(classType) || long.class.isAssignableFrom(classType)) {
             param.setHtmlType(HtmlTypeEnum.NUMBER_INTEGER);
             processed = true;
-        } else if (Double.class.isAssignableFrom(classType)) {
+        } else if (Double.class.isAssignableFrom(classType) || double.class.isAssignableFrom(classType)) {
             param.setHtmlType(HtmlTypeEnum.NUMBER_DECIMAL);
             processed = true;
-        } else if (Float.class.isAssignableFrom(classType)) {
+        } else if (Float.class.isAssignableFrom(classType) || float.class.isAssignableFrom(classType)) {
             param.setHtmlType(HtmlTypeEnum.NUMBER_DECIMAL);
             processed = true;
         } else if (String.class.isAssignableFrom(classType)) {
             param.setHtmlType(HtmlTypeEnum.TEXT);
             processed = true;
-        } else if (Character.class.isAssignableFrom(classType)) {
+        } else if (Character.class.isAssignableFrom(classType) || char.class.isAssignableFrom(classType)) {
             param.setHtmlType(HtmlTypeEnum.TEXT_CHAR);
             processed = true;
-        } else if (Short.class.isAssignableFrom(classType)) {
+        } else if (Short.class.isAssignableFrom(classType) || short.class.isAssignableFrom(classType)) {
             param.setHtmlType(HtmlTypeEnum.NUMBER_INTEGER);
             processed = true;
         }
@@ -300,7 +301,7 @@ public class DubboApiDocsAnnotationScanner implements ApplicationListener<Applic
         }
 
         // haven't dealt with it. Go on
-        if (Boolean.class.isAssignableFrom(classType)) {
+        if (Boolean.class.isAssignableFrom(classType) || boolean.class.isAssignableFrom(classType)) {
             param.setHtmlType(HtmlTypeEnum.SELECT);
             // Boolean can only be true / false. No matter what the previous allowed value is, it is forced to replace
             param.setAllowableValues(new String[]{"true", "false"});
diff --git a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ApiCacheItem.java b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ApiCacheItem.java
index 21a7011..f88c039 100644
--- a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ApiCacheItem.java
+++ b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ApiCacheItem.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.dubbo.apidocs.core.beans;
 
 import java.util.List;
diff --git a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ApiParamsCacheItem.java b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ApiParamsCacheItem.java
index 93347af..3571da2 100644
--- a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ApiParamsCacheItem.java
+++ b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ApiParamsCacheItem.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.dubbo.apidocs.core.beans;
 
 import java.util.List;
diff --git a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ModuleCacheItem.java b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ModuleCacheItem.java
index 5f48980..e729969 100644
--- a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ModuleCacheItem.java
+++ b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/core/beans/ModuleCacheItem.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.dubbo.apidocs.core.beans;
 
 import java.util.List;
diff --git a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/utils/ClassTypeUtil.java b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/utils/ClassTypeUtil.java
index a7e9179..b11d534 100644
--- a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/utils/ClassTypeUtil.java
+++ b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/utils/ClassTypeUtil.java
@@ -140,23 +140,23 @@ public class ClassTypeUtil {
     }
 
     private static Object initClassTypeWithDefaultValueNoProceeField(Type genericType, Class<?> classType, int processCount) {
-        if (Integer.class.isAssignableFrom(classType)) {
+        if (Integer.class.isAssignableFrom(classType) || int.class.isAssignableFrom(classType)) {
             return 0;
-        } else if (Byte.class.isAssignableFrom(classType)) {
+        } else if (Byte.class.isAssignableFrom(classType) || byte.class.isAssignableFrom(classType)) {
             return (byte) 0;
-        } else if (Long.class.isAssignableFrom(classType)) {
+        } else if (Long.class.isAssignableFrom(classType) || long.class.isAssignableFrom(classType)) {
             return 0L;
-        } else if (Double.class.isAssignableFrom(classType)) {
+        } else if (Double.class.isAssignableFrom(classType) || double.class.isAssignableFrom(classType)) {
             return 0.0D;
-        } else if (Float.class.isAssignableFrom(classType)) {
+        } else if (Float.class.isAssignableFrom(classType) || float.class.isAssignableFrom(classType)) {
             return 0.0F;
         } else if (String.class.isAssignableFrom(classType)) {
             return "";
-        } else if (Character.class.isAssignableFrom(classType)) {
+        } else if (Character.class.isAssignableFrom(classType) || char.class.isAssignableFrom(classType)) {
             return 'c';
-        } else if (Short.class.isAssignableFrom(classType)) {
+        } else if (Short.class.isAssignableFrom(classType) || short.class.isAssignableFrom(classType)) {
             return (short) 0;
-        } else if (Boolean.class.isAssignableFrom(classType)) {
+        } else if (Boolean.class.isAssignableFrom(classType) || boolean.class.isAssignableFrom(classType)) {
             return false;
         } else if (Date.class.isAssignableFrom(classType)) {
             return "【" + Date.class.getName() + "】yyyy-MM-dd HH:mm:ss";
diff --git a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/utils/SimpleTypeImpl.java b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/utils/SimpleTypeImpl.java
index d48fa74..826a96a 100644
--- a/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/utils/SimpleTypeImpl.java
+++ b/dubbo-api-docs/dubbo-api-docs-core/src/main/java/org/apache/dubbo/apidocs/utils/SimpleTypeImpl.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.dubbo.apidocs.utils;
 
 import java.lang.reflect.Type;
diff --git a/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/api/IQuickStartDemo.java b/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/api/IQuickStartDemo.java
new file mode 100644
index 0000000..ed99fe4
--- /dev/null
+++ b/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/api/IQuickStartDemo.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.apidocs.examples.api;
+
+import org.apache.dubbo.apidocs.examples.params.QuickStartRequestBean;
+import org.apache.dubbo.apidocs.examples.params.QuickStartRespBean;
+
+/**
+ * quick start demo.
+ */
+public interface IQuickStartDemo {
+
+    /**
+     * quick start demo.
+     *
+     * @param strParam
+     * @param beanParam
+     * @return org.apache.dubbo.apidocs.examples.params.QuickStartRespBean
+     */
+    QuickStartRespBean quickStart(String strParam, QuickStartRequestBean beanParam);
+
+}
diff --git a/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/params/QuickStartRequestBean.java b/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/params/QuickStartRequestBean.java
new file mode 100644
index 0000000..30e9ef3
--- /dev/null
+++ b/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/params/QuickStartRequestBean.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.apidocs.examples.params;
+
+import org.apache.dubbo.apidocs.annotations.RequestParam;
+
+/**
+ * quick start demo request parameter bean.
+ */
+public class QuickStartRequestBean {
+
+    @RequestParam(value = "You name", required = true, description = "please enter your full name", example = "Zhang San")
+    private String name;
+
+    @RequestParam(value = "You age", defaultValue = "18")
+    private int age;
+
+    @RequestParam("Are you a main?")
+    private boolean man;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getAge() {
+        return age;
+    }
+
+    public void setAge(int age) {
+        this.age = age;
+    }
+
+    public boolean getMan() {
+        return man;
+    }
+
+    public void setMan(boolean man) {
+        this.man = man;
+    }
+
+    @Override
+    public String toString() {
+        return "QuickStartRequestBean{" +
+                "name='" + name + '\'' +
+                ", age=" + age +
+                ", man=" + man +
+                '}';
+    }
+}
diff --git a/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/params/QuickStartRespBean.java b/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/params/QuickStartRespBean.java
new file mode 100644
index 0000000..ccb84c7
--- /dev/null
+++ b/dubbo-api-docs/dubbo-api-docs-examples/examples-api/src/main/java/org/apache/dubbo/apidocs/examples/params/QuickStartRespBean.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.apidocs.examples.params;
+
+import org.apache.dubbo.apidocs.annotations.ResponseProperty;
+
+/**
+ * quick star demo response bean.
+ */
+public class QuickStartRespBean {
+
+    @ResponseProperty(value = "Response code", example = "500")
+    private int code;
+
+    @ResponseProperty("Response message")
+    private String msg;
+
+    public QuickStartRespBean(int code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+}
diff --git a/dubbo-api-docs/dubbo-api-docs-examples/examples-provider-sca/pom.xml b/dubbo-api-docs/dubbo-api-docs-examples/examples-provider-sca/pom.xml
index 7765916..c1ff683 100644
--- a/dubbo-api-docs/dubbo-api-docs-examples/examples-provider-sca/pom.xml
+++ b/dubbo-api-docs/dubbo-api-docs-examples/examples-provider-sca/pom.xml
@@ -58,5 +58,17 @@
 
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <mainClass>org.apache.dubbo.apidocs.examples.ExampleScaApplication</mainClass>
+                    <classifier>exec</classifier>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>
diff --git a/dubbo-api-docs/dubbo-api-docs-examples/examples-provider/pom.xml b/dubbo-api-docs/dubbo-api-docs-examples/examples-provider/pom.xml
index c3bd6c5..aa16cae 100644
--- a/dubbo-api-docs/dubbo-api-docs-examples/examples-provider/pom.xml
+++ b/dubbo-api-docs/dubbo-api-docs-examples/examples-provider/pom.xml
@@ -76,5 +76,18 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <mainClass>org.apache.dubbo.apidocs.examples.ExampleApplication</mainClass>
+                    <classifier>exec</classifier>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
 
 </project>
diff --git a/dubbo-api-docs/dubbo-api-docs-examples/examples-provider/src/main/java/org/apache/dubbo/apidocs/examples/api/impl/QuickStartDemoImpl.java b/dubbo-api-docs/dubbo-api-docs-examples/examples-provider/src/main/java/org/apache/dubbo/apidocs/examples/api/impl/QuickStartDemoImpl.java
new file mode 100644
index 0000000..0d9bdc7
--- /dev/null
+++ b/dubbo-api-docs/dubbo-api-docs-examples/examples-provider/src/main/java/org/apache/dubbo/apidocs/examples/api/impl/QuickStartDemoImpl.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.apidocs.examples.api.impl;
+
+import org.apache.dubbo.apidocs.annotations.ApiDoc;
+import org.apache.dubbo.apidocs.annotations.ApiModule;
+import org.apache.dubbo.apidocs.annotations.RequestParam;
+import org.apache.dubbo.apidocs.examples.api.IQuickStartDemo;
+import org.apache.dubbo.apidocs.examples.params.QuickStartRequestBean;
+import org.apache.dubbo.apidocs.examples.params.QuickStartRespBean;
+import org.apache.dubbo.config.annotation.DubboService;
+
+/**
+ * quick start demo implement.
+ *
+ * @author klw(213539 @ qq.com)
+ * @date 2020/12/23 17:21
+ */
+@DubboService
+@ApiModule(value = "quick start demo", apiInterface = IQuickStartDemo.class, version = "v0.1")
+public class QuickStartDemoImpl implements IQuickStartDemo {
+
+    @ApiDoc(value = "quick start demo", version = "v0.1", description = "this api is a quick start demo", responseClassDescription="A quick star response bean")
+    @Override
+    public QuickStartRespBean quickStart(@RequestParam(value = "strParam", required = true) String strParam, QuickStartRequestBean beanParam) {
+        return new QuickStartRespBean(200, "hello " + beanParam.getName() + ", " + beanParam.toString());
+    }
+}