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

liujun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-samples.git


The following commit(s) were added to refs/heads/master by this push:
     new 579854a  Add triple samples (#286)
579854a is described below

commit 579854ad7806a799692fcccbef9ae76e08956bdf
Author: GuoHao <[email protected]>
AuthorDate: Tue Mar 16 19:41:07 2021 +0800

    Add triple samples (#286)
---
 dubbo-samples-triple/pom.xml                       | 175 +++++++++++++++++++++
 .../com/apache/dubbo/sample/basic/ApiConsumer.java |  57 +++++++
 .../com/apache/dubbo/sample/basic/ApiProvider.java |  39 +++++
 .../dubbo/sample/basic/ApiWrapperConsumer.java     |  40 +++++
 .../dubbo/sample/basic/ApiWrapperProvider.java     |  40 +++++
 .../com/apache/dubbo/sample/basic/IGreeter.java    |  31 ++++
 .../apache/dubbo/sample/basic/IGreeter1Impl.java   |  30 ++++
 .../com/apache/dubbo/sample/basic/IGreeter2.java   |  28 ++++
 .../apache/dubbo/sample/basic/IGreeter2Impl.java   |  30 ++++
 .../src/main/proto/helloworld.proto                |  31 ++++
 .../src/main/resources/log4j.properties            |  26 +++
 pom.xml                                            |   1 +
 12 files changed, 528 insertions(+)

diff --git a/dubbo-samples-triple/pom.xml b/dubbo-samples-triple/pom.xml
new file mode 100644
index 0000000..bb12403
--- /dev/null
+++ b/dubbo-samples-triple/pom.xml
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <parent>
+        <artifactId>dubbo-samples-all</artifactId>
+        <groupId>org.apache.dubbo</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>dubbo-samples-triple</artifactId>
+
+    <properties>
+        <source.level>1.8</source.level>
+        <target.level>1.8</target.level>
+        <dubbo.version>3.0.0-SNAPSHOT</dubbo.version>
+        <junit.version>4.12</junit.version>
+        <spring-test.version>4.3.16.RELEASE</spring-test.version>
+        <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
+        <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
+        <spring-boot.version>1.5.13.RELEASE</spring-boot.version>
+        <grpc.version>1.19.0</grpc.version>
+        <protoc.version>3.7.1</protoc.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo</artifactId>
+            <version>${dubbo.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+            <version>3.14.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.dubbo</groupId>
+            <artifactId>dubbo-dependencies-zookeeper</artifactId>
+            <version>${dubbo.version}</version>
+            <type>pom</type>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+            <version>${spring-test.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>testcontainers</artifactId>
+            <version>1.12.3</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <profiles>
+        <profile>
+            <id>dubbo-integration-test</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <version>${maven-failsafe-plugin.version}</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>integration-test</goal>
+                                    <goal>verify</goal>
+                                </goals>
+                                <configuration>
+                                    <includes>
+                                        <include>**/*IT.java</include>
+                                    </includes>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <!-- For jdk 11 above JavaEE annotation -->
+        <profile>
+            <id>javax.annotation</id>
+            <activation>
+                <jdk>[1.11,)</jdk>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>javax.annotation</groupId>
+                    <artifactId>javax.annotation-api</artifactId>
+                    <version>1.3.2</version>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+
+    <build>
+        <extensions>
+            <extension>
+                <groupId>kr.motd.maven</groupId>
+                <artifactId>os-maven-plugin</artifactId>
+                <version>1.6.1</version>
+            </extension>
+        </extensions>
+        <plugins>
+            <plugin>
+                <groupId>org.xolstice.maven.plugins</groupId>
+                <artifactId>protobuf-maven-plugin</artifactId>
+                <version>0.6.1</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>compile</goal>
+                            <goal>test-compile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>${maven-compiler-plugin.version}</version>
+                <configuration>
+                    <source>${source.level}</source>
+                    <target>${target.level}</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                
<source>build/generated/source/proto/main/java</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git 
a/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiConsumer.java
 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiConsumer.java
new file mode 100644
index 0000000..1f489cf
--- /dev/null
+++ 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiConsumer.java
@@ -0,0 +1,57 @@
+/*
+ *  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 com.apache.dubbo.sample.basic;
+
+import org.apache.dubbo.common.constants.CommonConstants;
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ReferenceConfig;
+import org.apache.dubbo.config.RegistryConfig;
+
+import org.apache.dubbo.hello.HelloReply;
+import org.apache.dubbo.hello.HelloRequest;
+
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+
+public class ApiConsumer {
+    public static void main(String[] args) throws InterruptedException, 
IOException {
+        ReferenceConfig<IGreeter> ref = new ReferenceConfig<>();
+        ref.setInterface(IGreeter.class);
+        ref.setCheck(false);
+        ref.setInterface(IGreeter.class);
+        ref.setCheck(false);
+        ref.setProtocol(CommonConstants.TRIPLE);
+        ref.setLazy(true);
+        ref.setTimeout(100000);
+        ref.setApplication(new ApplicationConfig("demo-consumer"));
+        ref.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181"));
+        final IGreeter iGreeter = ref.get();
+
+        System.out.println("dubbo ref started");
+        try {
+            final HelloReply reply = 
iGreeter.sayHello(HelloRequest.newBuilder()
+                    .setName("name")
+                    .build());
+            TimeUnit.SECONDS.sleep(1);
+            System.out.println("Reply:" + reply);
+        } catch (Throwable t) {
+            t.printStackTrace();
+        }
+        System.in.read();
+    }
+}
diff --git 
a/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiProvider.java
 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiProvider.java
new file mode 100644
index 0000000..e052dcb
--- /dev/null
+++ 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiProvider.java
@@ -0,0 +1,39 @@
+/*
+ *  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 com.apache.dubbo.sample.basic;
+
+import org.apache.dubbo.common.constants.CommonConstants;
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ProtocolConfig;
+import org.apache.dubbo.config.RegistryConfig;
+import org.apache.dubbo.config.ServiceConfig;
+import java.util.concurrent.CountDownLatch;
+
+public class ApiProvider {
+    public static void main(String[] args) throws InterruptedException {
+        ServiceConfig<IGreeter> service = new ServiceConfig<>();
+        service.setInterface(IGreeter.class);
+        service.setRef(new IGreeter1Impl());
+        service.setProtocol(new ProtocolConfig(CommonConstants.TRIPLE, 50051));
+        service.setApplication(new ApplicationConfig("demo-provider"));
+        service.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181"));
+        service.export();
+        System.out.println("dubbo service started");
+        new CountDownLatch(1).await();
+    }
+}
diff --git 
a/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiWrapperConsumer.java
 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiWrapperConsumer.java
new file mode 100644
index 0000000..abdb343
--- /dev/null
+++ 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiWrapperConsumer.java
@@ -0,0 +1,40 @@
+/*
+ *  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 com.apache.dubbo.sample.basic;
+
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ReferenceConfig;
+import org.apache.dubbo.config.RegistryConfig;
+
+public class ApiWrapperConsumer {
+    public static void main(String[] args) {
+        ReferenceConfig<IGreeter2> ref = new ReferenceConfig<>();
+        ref.setInterface(IGreeter2.class);
+        ref.setCheck(false);
+        ref.setProtocol("tri");
+        ref.setLazy(true);
+        ref.setApplication(new ApplicationConfig("demo-consumer"));
+        ref.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181"));
+        final IGreeter2 iGreeter = ref.get();
+        System.out.println("dubbo ref started");
+        long st = System.currentTimeMillis();
+        String reply = iGreeter.sayHello0("haha");
+        // 4MB response
+        System.out.println("Reply len:" + reply.length() + " cost:" + 
(System.currentTimeMillis() - st));
+    }
+}
diff --git 
a/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiWrapperProvider.java
 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiWrapperProvider.java
new file mode 100644
index 0000000..e8176f6
--- /dev/null
+++ 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/ApiWrapperProvider.java
@@ -0,0 +1,40 @@
+/*
+ *  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 com.apache.dubbo.sample.basic;
+
+import org.apache.dubbo.common.constants.CommonConstants;
+import org.apache.dubbo.config.ApplicationConfig;
+import org.apache.dubbo.config.ProtocolConfig;
+import org.apache.dubbo.config.RegistryConfig;
+import org.apache.dubbo.config.ServiceConfig;
+
+import java.io.IOException;
+
+public class ApiWrapperProvider {
+    public static void main(String[] args) throws IOException {
+        ServiceConfig<IGreeter2> service = new ServiceConfig<>();
+        service.setInterface(IGreeter2.class);
+        service.setRef(new IGreeter2Impl());
+        service.setProtocol(new ProtocolConfig(CommonConstants.TRIPLE, 50051));
+        service.setApplication(new ApplicationConfig("demo-provider"));
+        service.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181"));
+        service.export();
+        System.out.println("dubbo service started");
+        System.in.read();
+    }
+}
diff --git 
a/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter.java
 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter.java
new file mode 100644
index 0000000..c8d215e
--- /dev/null
+++ 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter.java
@@ -0,0 +1,31 @@
+/*
+ *  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 com.apache.dubbo.sample.basic;
+
+import org.apache.dubbo.hello.HelloReply;
+import org.apache.dubbo.hello.HelloRequest;
+
+public interface IGreeter {
+    /**
+     * <pre>
+     *  Sends a greeting
+     * </pre>
+     */
+    HelloReply sayHello(HelloRequest request);
+
+}
diff --git 
a/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter1Impl.java
 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter1Impl.java
new file mode 100644
index 0000000..11a3129
--- /dev/null
+++ 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter1Impl.java
@@ -0,0 +1,30 @@
+/*
+ *  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 com.apache.dubbo.sample.basic;
+
+import org.apache.dubbo.hello.HelloReply;
+import org.apache.dubbo.hello.HelloRequest;
+
+public class IGreeter1Impl implements IGreeter {
+    @Override
+    public HelloReply sayHello(HelloRequest request) {
+        return HelloReply.newBuilder()
+                .setMessage(request.getName())
+                .build();
+    }
+}
diff --git 
a/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter2.java
 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter2.java
new file mode 100644
index 0000000..bd91137
--- /dev/null
+++ 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter2.java
@@ -0,0 +1,28 @@
+/*
+ *  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 com.apache.dubbo.sample.basic;
+
+public interface IGreeter2 {
+    /**
+     * <pre>
+     *  Sends a greeting
+     * </pre>
+     */
+    String sayHello0(String request);
+
+}
diff --git 
a/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter2Impl.java
 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter2Impl.java
new file mode 100644
index 0000000..9010e0a
--- /dev/null
+++ 
b/dubbo-samples-triple/src/main/java/com/apache/dubbo/sample/basic/IGreeter2Impl.java
@@ -0,0 +1,30 @@
+/*
+ *  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 com.apache.dubbo.sample.basic;
+
+public class IGreeter2Impl implements IGreeter2 {
+    @Override
+    public String sayHello0(String request) {
+        StringBuilder respBuilder = new StringBuilder(request);
+        for (int i = 0; i < 20; i++) {
+            respBuilder.append(respBuilder);
+        }
+        request = respBuilder.toString();
+        return request;
+    }
+}
diff --git a/dubbo-samples-triple/src/main/proto/helloworld.proto 
b/dubbo-samples-triple/src/main/proto/helloworld.proto
new file mode 100644
index 0000000..2e5b31c
--- /dev/null
+++ b/dubbo-samples-triple/src/main/proto/helloworld.proto
@@ -0,0 +1,31 @@
+// Copyright 2015 The gRPC Authors
+//
+// Licensed 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.
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.apache.dubbo.hello";
+option java_outer_classname = "HelloWorldProto";
+option objc_class_prefix = "HLW";
+
+package helloworld;
+
+// The request message containing the user's name.
+message HelloRequest {
+  string name = 1;
+}
+
+// The response message containing the greetings
+message HelloReply {
+  string message = 1;
+}
diff --git a/dubbo-samples-triple/src/main/resources/log4j.properties 
b/dubbo-samples-triple/src/main/resources/log4j.properties
new file mode 100644
index 0000000..6b82aba
--- /dev/null
+++ b/dubbo-samples-triple/src/main/resources/log4j.properties
@@ -0,0 +1,26 @@
+#
+#
+#   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.
+#
+#
+
+###set log levels###
+log4j.rootLogger=debug, stdout
+###output to the console###
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=[%d{dd/MM/yy hh:mm:ss:sss z}] 
%t %5p %c{2}: %m%n
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 1cc9a86..8f1757f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,6 +81,7 @@
         <module>dubbo-samples-cloud-native</module>
         <module>dubbo-samples-protobuf</module>
         <module>dubbo-samples-protobuf-json</module>
+        <module>dubbo-samples-triple</module>
         <module>dubbo-samples-ssl</module>
         <module>dubbo-samples-perf</module>
         <module>dubbo-samples-tengine</module>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to