You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by zh...@apache.org on 2021/09/04 15:57:44 UTC
[dubbo-go-samples] 02/18: up:修改dubbo-go版本
This is an automated email from the ASF dual-hosted git repository.
zhaoyunxing pushed a commit to branch 1.5
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git
commit 62acd57d067246a025c145c6eb86ac66c111105e
Merge: c89e24a fc4f6db
Author: zhaoyunxing92 <23...@qq.com>
AuthorDate: Sun May 16 19:57:15 2021 +0800
up:修改dubbo-go版本
.../2.6/src/main/java/org/apache/dubbo/Gender.java | 46 +--
.../2.6/src/main/java/org/apache/dubbo/User.java | 166 ++++----
.../main/java/org/apache/dubbo/UserProvider.java | 54 +--
.../2.7/src/main/java/org/apache/dubbo/Gender.java | 46 +--
.../2.7/src/main/java/org/apache/dubbo/User.java | 166 ++++----
.../main/java/org/apache/dubbo/UserProvider.java | 54 +--
.../2.6/src/main/java/org/apache/dubbo/Gender.java | 46 +--
.../2.6/src/main/java/org/apache/dubbo/User.java | 190 ++++-----
.../main/java/org/apache/dubbo/UserProvider.java | 100 ++---
.../org/apache/dubbo/UserProviderAnotherImpl.java | 286 ++++++-------
.../java/org/apache/dubbo/UserProviderImpl.java | 230 +++++------
.../resources/META-INF/spring/dubbo.provider.xml | 72 ++--
.../2.6/src/main/resources/log4j.properties | 40 +-
.../2.7/src/main/java/org/apache/dubbo/Gender.java | 46 +--
.../2.7/src/main/java/org/apache/dubbo/User.java | 190 ++++-----
.../main/java/org/apache/dubbo/UserProvider.java | 100 ++---
.../org/apache/dubbo/UserProviderAnotherImpl.java | 286 ++++++-------
.../java/org/apache/dubbo/UserProviderImpl.java | 230 +++++------
.../resources/META-INF/spring/dubbo.provider.xml | 72 ++--
.../2.7/src/main/resources/log4j.properties | 40 +-
general/grpc/stream/go-client/profiles/dev/log.yml | 56 +--
.../grpc/stream/go-client/profiles/release/log.yml | 56 +--
.../grpc/stream/go-client/profiles/test/log.yml | 56 +--
general/grpc/stream/go-server/profiles/dev/log.yml | 56 +--
.../grpc/stream/go-server/profiles/release/log.yml | 56 +--
.../grpc/stream/go-server/profiles/test/log.yml | 56 +--
general/grpc/unary/go-client/profiles/dev/log.yml | 56 +--
.../grpc/unary/go-client/profiles/release/log.yml | 56 +--
general/grpc/unary/go-client/profiles/test/log.yml | 56 +--
general/grpc/unary/go-server/profiles/dev/log.yml | 56 +--
.../grpc/unary/go-server/profiles/release/log.yml | 56 +--
general/grpc/unary/go-server/profiles/test/log.yml | 56 +--
general/jsonrpc/go-client/profiles/dev/log.yml | 56 +--
general/jsonrpc/go-client/profiles/release/log.yml | 56 +--
general/jsonrpc/go-client/profiles/test/log.yml | 56 +--
general/jsonrpc/go-server/profiles/dev/log.yml | 56 +--
general/jsonrpc/go-server/profiles/release/log.yml | 56 +--
general/jsonrpc/go-server/profiles/test/log.yml | 56 +--
.../java-client/src/main/assembly/assembly.xml | 76 ++--
.../src/main/assembly/conf/dubbo.properties | 26 +-
.../src/main/java/com/ikurento/user/Gender.java | 46 +--
.../src/main/java/com/ikurento/user/User.java | 166 ++++----
.../main/java/com/ikurento/user/UserProvider.java | 50 +--
.../src/main/resources/META-INF/spring/service.xml | 76 ++--
.../src/main/resources/dubbo.properties | 26 +-
.../java-server/src/main/assembly/assembly.xml | 88 ++--
.../src/main/assembly/conf/dubbo.properties | 28 +-
.../src/main/assembly/conf/log4j.properties | 40 +-
.../src/main/java/com/ikurento/user/Gender.java | 46 +--
.../src/main/java/com/ikurento/user/User.java | 190 ++++-----
.../main/java/com/ikurento/user/UserProvider.java | 92 ++---
.../com/ikurento/user/UserProviderAnotherImpl.java | 268 ++++++------
.../java/com/ikurento/user/UserProviderImpl.java | 222 +++++-----
.../resources/META-INF/spring/dubbo.provider.xml | 78 ++--
.../src/main/resources/log4j.properties | 40 +-
.../2.6/src/main/java/org/apache/dubbo/Gender.java | 46 +--
.../2.6/src/main/java/org/apache/dubbo/User.java | 190 ++++-----
.../main/java/org/apache/dubbo/UserProvider.java | 100 ++---
.../org/apache/dubbo/UserProviderAnotherImpl.java | 286 ++++++-------
.../java/org/apache/dubbo/UserProviderImpl.java | 230 +++++------
.../resources/META-INF/spring/dubbo.provider.xml | 72 ++--
.../2.6/src/main/resources/log4j.properties | 40 +-
.../2.7/src/main/java/org/apache/dubbo/Gender.java | 46 +--
.../2.7/src/main/java/org/apache/dubbo/User.java | 190 ++++-----
.../main/java/org/apache/dubbo/UserProvider.java | 100 ++---
.../org/apache/dubbo/UserProviderAnotherImpl.java | 286 ++++++-------
.../java/org/apache/dubbo/UserProviderImpl.java | 230 +++++------
.../resources/META-INF/spring/dubbo.provider.xml | 72 ++--
.../2.7/src/main/resources/log4j.properties | 40 +-
go.mod | 1 +
integrate_test.sh | 0
registry/kubernetes/README.md | 56 +--
seata/client/profiles/dev/log.yml | 56 +--
seata/client/profiles/release/log.yml | 56 +--
seata/client/profiles/test/log.yml | 56 +--
seata/order-svc/profiles/dev/log.yml | 56 +--
seata/order-svc/profiles/release/log.yml | 56 +--
seata/order-svc/profiles/test/log.yml | 56 +--
seata/product-svc/profiles/dev/log.yml | 56 +--
seata/product-svc/profiles/release/log.yml | 56 +--
seata/product-svc/profiles/test/log.yml | 56 +--
tracing/dubbo/go-client/profiles/dev/log.yml | 56 +--
tracing/dubbo/go-client/profiles/release/log.yml | 56 +--
tracing/dubbo/go-client/profiles/test/log.yml | 56 +--
tracing/dubbo/go-server/profiles/dev/log.yml | 56 +--
tracing/dubbo/go-server/profiles/release/log.yml | 56 +--
tracing/dubbo/go-server/profiles/test/log.yml | 56 +--
tracing/dubbo/java-client/pom.xml | 460 ++++++++++-----------
.../java-client/src/main/assembly/assembly.xml | 84 ++--
.../src/main/java/com/ikurento/user/User.java | 152 +++----
.../main/java/com/ikurento/user/UserProvider.java | 36 +-
.../src/main/resources/META-INF/spring/service.xml | 54 +--
.../src/main/resources/dubbo.properties | 26 +-
.../java-server/src/main/assembly/assembly.xml | 86 ++--
.../src/main/java/com/ikurento/user/User.java | 172 ++++----
.../main/java/com/ikurento/user/UserProvider.java | 48 +--
.../java/com/ikurento/user/UserProviderImpl.java | 60 +--
.../resources/META-INF/spring/dubbo.provider.xml | 66 +--
.../src/main/resources/dubbo.properties | 28 +-
.../src/main/resources/log4j.properties | 40 +-
tracing/jsonrpc/go-client/profiles/dev/log.yml | 56 +--
tracing/jsonrpc/go-client/profiles/release/log.yml | 56 +--
tracing/jsonrpc/go-client/profiles/test/log.yml | 56 +--
tracing/jsonrpc/go-server/profiles/dev/log.yml | 56 +--
tracing/jsonrpc/go-server/profiles/release/log.yml | 56 +--
tracing/jsonrpc/go-server/profiles/test/log.yml | 56 +--
106 files changed, 4750 insertions(+), 4749 deletions(-)
diff --cc general/dubbo/java-client/2.6/src/main/java/org/apache/dubbo/Gender.java
index 7b503cc,0000000..a016781
mode 100644,000000..100644
--- a/general/dubbo/java-client/2.6/src/main/java/org/apache/dubbo/Gender.java
+++ b/general/dubbo/java-client/2.6/src/main/java/org/apache/dubbo/Gender.java
@@@ -1,23 -1,0 +1,23 @@@
- /*
- * 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;
-
- public enum Gender {
- MAN,
- WOMAN
- }
++/*
++ * 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;
++
++public enum Gender {
++ MAN,
++ WOMAN
++}
diff --cc general/dubbo/java-client/2.6/src/main/java/org/apache/dubbo/User.java
index 1d950db,0000000..0514219
mode 100644,000000..100644
--- a/general/dubbo/java-client/2.6/src/main/java/org/apache/dubbo/User.java
+++ b/general/dubbo/java-client/2.6/src/main/java/org/apache/dubbo/User.java
@@@ -1,83 -1,0 +1,83 @@@
- /*
- * 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;
-
- import java.util.Date;
-
- public class User {
-
- private String id;
-
- private String name;
-
- private int age;
-
- private Date time = new Date();
-
- private Gender sex = Gender.MAN;
-
- public User() {
- }
-
-
- public User(String id, String name, int age) {
- this.id = id;
- this.name = name;
- this.age = age;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- 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 Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
- public Gender getSex() {
- return sex;
- }
-
- public void setSex(Gender sex) {
- this.sex = sex;
- }
- }
++/*
++ * 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;
++
++import java.util.Date;
++
++public class User {
++
++ private String id;
++
++ private String name;
++
++ private int age;
++
++ private Date time = new Date();
++
++ private Gender sex = Gender.MAN;
++
++ public User() {
++ }
++
++
++ public User(String id, String name, int age) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ }
++
++ public String getId() {
++ return id;
++ }
++
++ public void setId(String id) {
++ this.id = id;
++ }
++
++ 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 Date getTime() {
++ return time;
++ }
++
++ public void setTime(Date time) {
++ this.time = time;
++ }
++
++ public Gender getSex() {
++ return sex;
++ }
++
++ public void setSex(Gender sex) {
++ this.sex = sex;
++ }
++}
diff --cc general/dubbo/java-client/2.6/src/main/java/org/apache/dubbo/UserProvider.java
index d4bbb84,0000000..1c8af6b
mode 100644,000000..100644
--- a/general/dubbo/java-client/2.6/src/main/java/org/apache/dubbo/UserProvider.java
+++ b/general/dubbo/java-client/2.6/src/main/java/org/apache/dubbo/UserProvider.java
@@@ -1,27 -1,0 +1,27 @@@
- /*
- * 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.
- */
- package org.apache.dubbo;
-
- import java.util.List;
-
- public interface UserProvider {
- User GetUser(String userId);
- User GetErr(String userId) throws Exception;
- User GetUser1(String userId) throws Exception;
- User getUser(int usercode);
- User getUser(int usercode, String name);
- void GetUser3();
- List<User> GetUsers(List<String> userIdList);
- User GetUser0(String userId, String name);
- }
++/*
++ * 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.
++ */
++package org.apache.dubbo;
++
++import java.util.List;
++
++public interface UserProvider {
++ User GetUser(String userId);
++ User GetErr(String userId) throws Exception;
++ User GetUser1(String userId) throws Exception;
++ User getUser(int usercode);
++ User getUser(int usercode, String name);
++ void GetUser3();
++ List<User> GetUsers(List<String> userIdList);
++ User GetUser0(String userId, String name);
++}
diff --cc general/dubbo/java-client/2.7/src/main/java/org/apache/dubbo/Gender.java
index 7b503cc,0000000..a016781
mode 100644,000000..100644
--- a/general/dubbo/java-client/2.7/src/main/java/org/apache/dubbo/Gender.java
+++ b/general/dubbo/java-client/2.7/src/main/java/org/apache/dubbo/Gender.java
@@@ -1,23 -1,0 +1,23 @@@
- /*
- * 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;
-
- public enum Gender {
- MAN,
- WOMAN
- }
++/*
++ * 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;
++
++public enum Gender {
++ MAN,
++ WOMAN
++}
diff --cc general/dubbo/java-client/2.7/src/main/java/org/apache/dubbo/User.java
index 1d950db,0000000..0514219
mode 100644,000000..100644
--- a/general/dubbo/java-client/2.7/src/main/java/org/apache/dubbo/User.java
+++ b/general/dubbo/java-client/2.7/src/main/java/org/apache/dubbo/User.java
@@@ -1,83 -1,0 +1,83 @@@
- /*
- * 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;
-
- import java.util.Date;
-
- public class User {
-
- private String id;
-
- private String name;
-
- private int age;
-
- private Date time = new Date();
-
- private Gender sex = Gender.MAN;
-
- public User() {
- }
-
-
- public User(String id, String name, int age) {
- this.id = id;
- this.name = name;
- this.age = age;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- 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 Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
- public Gender getSex() {
- return sex;
- }
-
- public void setSex(Gender sex) {
- this.sex = sex;
- }
- }
++/*
++ * 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;
++
++import java.util.Date;
++
++public class User {
++
++ private String id;
++
++ private String name;
++
++ private int age;
++
++ private Date time = new Date();
++
++ private Gender sex = Gender.MAN;
++
++ public User() {
++ }
++
++
++ public User(String id, String name, int age) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ }
++
++ public String getId() {
++ return id;
++ }
++
++ public void setId(String id) {
++ this.id = id;
++ }
++
++ 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 Date getTime() {
++ return time;
++ }
++
++ public void setTime(Date time) {
++ this.time = time;
++ }
++
++ public Gender getSex() {
++ return sex;
++ }
++
++ public void setSex(Gender sex) {
++ this.sex = sex;
++ }
++}
diff --cc general/dubbo/java-client/2.7/src/main/java/org/apache/dubbo/UserProvider.java
index d4bbb84,0000000..1c8af6b
mode 100644,000000..100644
--- a/general/dubbo/java-client/2.7/src/main/java/org/apache/dubbo/UserProvider.java
+++ b/general/dubbo/java-client/2.7/src/main/java/org/apache/dubbo/UserProvider.java
@@@ -1,27 -1,0 +1,27 @@@
- /*
- * 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.
- */
- package org.apache.dubbo;
-
- import java.util.List;
-
- public interface UserProvider {
- User GetUser(String userId);
- User GetErr(String userId) throws Exception;
- User GetUser1(String userId) throws Exception;
- User getUser(int usercode);
- User getUser(int usercode, String name);
- void GetUser3();
- List<User> GetUsers(List<String> userIdList);
- User GetUser0(String userId, String name);
- }
++/*
++ * 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.
++ */
++package org.apache.dubbo;
++
++import java.util.List;
++
++public interface UserProvider {
++ User GetUser(String userId);
++ User GetErr(String userId) throws Exception;
++ User GetUser1(String userId) throws Exception;
++ User getUser(int usercode);
++ User getUser(int usercode, String name);
++ void GetUser3();
++ List<User> GetUsers(List<String> userIdList);
++ User GetUser0(String userId, String name);
++}
diff --cc general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/Gender.java
index 7b503cc,0000000..a016781
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/Gender.java
+++ b/general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/Gender.java
@@@ -1,23 -1,0 +1,23 @@@
- /*
- * 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;
-
- public enum Gender {
- MAN,
- WOMAN
- }
++/*
++ * 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;
++
++public enum Gender {
++ MAN,
++ WOMAN
++}
diff --cc general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/User.java
index 7fcfa38,0000000..039a883
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/User.java
+++ b/general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/User.java
@@@ -1,95 -1,0 +1,95 @@@
- /*
- * 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;
-
- import java.io.Serializable;
- import java.util.Date;
-
- public class User implements Serializable {
-
- private String id;
-
- private String name;
-
- private int age;
-
- private Date time = new Date();
-
- private Gender sex = Gender.MAN;
-
- public User() {
- }
-
- public User(String id, String name, int age) {
- this.id = id;
- this.name = name;
- this.age = age;
- }
-
- public User(String id, String name, int age, Date time, Gender sex) {
- this.id = id;
- this.name = name;
- this.age = age;
- this.time = time;
- this.sex = sex;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- 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 Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
- public Gender getSex() {
- return sex;
- }
-
- public void setSex(Gender sex) {
- this.sex = sex;
- }
-
- public String toString() {
- return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time + ", gender:" + sex + "}";
- }
- }
++/*
++ * 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;
++
++import java.io.Serializable;
++import java.util.Date;
++
++public class User implements Serializable {
++
++ private String id;
++
++ private String name;
++
++ private int age;
++
++ private Date time = new Date();
++
++ private Gender sex = Gender.MAN;
++
++ public User() {
++ }
++
++ public User(String id, String name, int age) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ }
++
++ public User(String id, String name, int age, Date time, Gender sex) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ this.time = time;
++ this.sex = sex;
++ }
++
++ public String getId() {
++ return id;
++ }
++
++ public void setId(String id) {
++ this.id = id;
++ }
++
++ 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 Date getTime() {
++ return time;
++ }
++
++ public void setTime(Date time) {
++ this.time = time;
++ }
++
++ public Gender getSex() {
++ return sex;
++ }
++
++ public void setSex(Gender sex) {
++ this.sex = sex;
++ }
++
++ public String toString() {
++ return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time + ", gender:" + sex + "}";
++ }
++}
diff --cc general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/UserProvider.java
index 1c13f05,0000000..5cd6ffe
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/UserProvider.java
+++ b/general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/UserProvider.java
@@@ -1,50 -1,0 +1,50 @@@
- /*
- * 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;
-
- import java.util.List;
- import java.util.Map;
-
- public interface UserProvider {
-
- boolean isLimit(Gender gender, String name);
-
- User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
-
- List<User> GetUsers(List<String> userIdList);
-
- void GetUser3();
-
- User GetUser0(String userId, String name);
-
- User GetErr(String userId) throws Exception;
-
- Map<String, User> GetUserMap(List<String> userIdList);
-
- User getUser(int usercode);
-
- User getUser(int usercode, String name);
-
- User queryUser(User user);
-
- Map<String, User> queryAll();
-
- int Calc(int a, int b);
-
- Response<Integer> Sum(int a, int b);
- }
++/*
++ * 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;
++
++import java.util.List;
++import java.util.Map;
++
++public interface UserProvider {
++
++ boolean isLimit(Gender gender, String name);
++
++ User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
++
++ List<User> GetUsers(List<String> userIdList);
++
++ void GetUser3();
++
++ User GetUser0(String userId, String name);
++
++ User GetErr(String userId) throws Exception;
++
++ Map<String, User> GetUserMap(List<String> userIdList);
++
++ User getUser(int usercode);
++
++ User getUser(int usercode, String name);
++
++ User queryUser(User user);
++
++ Map<String, User> queryAll();
++
++ int Calc(int a, int b);
++
++ Response<Integer> Sum(int a, int b);
++}
diff --cc general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
index cc6170e,0000000..3e2f9f2
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
+++ b/general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
@@@ -1,143 -1,0 +1,143 @@@
- /*
- * 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;
-
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-
- import java.util.*;
-
- public class UserProviderAnotherImpl implements UserProvider {
- // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
- private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to com.dubbogo.user-server.log
-
- private Map<String, User> userMap = new HashMap<String, User>();
-
- public UserProviderAnotherImpl() {
- // userMap.put("001", new User("001", "other-zhangsan", 18, new Date(1998-1900, 1, 2, 3, 4, 5), Gender.MAN));
- userMap.put("001", new User("001", "other-zhangsan", 18, new Date(0x12345678), Gender.MAN));
- userMap.put("002", new User("002", "other-lisi", 20, new Date(1996-1900, 1, 2, 3, 4, 5), Gender.MAN));
- userMap.put("003", new User("003", "other-lily", 23, new Date(1993-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
- userMap.put("004", new User("004", "other-lisa", 32, new Date(1985-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
- }
-
- public boolean isLimit(Gender gender, String name) {
- logger.info(String.format("input gender=%sand name=%s", gender, name));
- return Gender.MAN == gender;
- }
-
- public User GetUser(String userId) {
- logger.info("input userId = " + userId);
- return new User(userId, "Joe", 48);
- }
-
- public User GetUser0(String userId, String name) {
- return new User(userId, name, 48);
- }
-
- public void GetUser3() {
- logger.info("this is GetUser3 of another");
- }
-
- public User GetErr(String userId) throws Exception {
- throw new Exception("exception");
- }
-
- public List<User> GetUsers(ArrayList<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- public Map<String, User> GetUserMap(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- Map<String, User> map = new HashMap<String, User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- map.put(id, userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return map;
- }
-
- public List<User> GetUsers(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- // @Override
- public User getUser(int userCode) {
- logger.info("input userCode = " + userCode);
- return new User(String.valueOf(userCode), "userCode get", 48);
- }
-
- public User getUser(int usercode, String name) {
- return new User(String.valueOf(usercode), name, 18);
- }
-
- public User queryUser(User user) {
- logger.info("input com.dubbogo.user = " + user);
- return new User(user.getId(), "get:" + user.getName(), user.getAge() + 18);
- }
-
- public Map<String, User> queryAll() {
- logger.info("input");
- Map<String, User> map = new HashMap<String, User>();
- map.put("001", new User("001", "Joe", 18));
- map.put("002", new User("002", "Wen", 20));
-
- return map;
- }
-
- public int Calc(int a,int b) {
- return a + b + 100;
- }
-
- public Response<Integer> Sum(int a,int b) {
- return Response.ok(a+b);
- }
- }
++/*
++ * 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;
++
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++import java.util.*;
++
++public class UserProviderAnotherImpl implements UserProvider {
++ // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
++ private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to com.dubbogo.user-server.log
++
++ private Map<String, User> userMap = new HashMap<String, User>();
++
++ public UserProviderAnotherImpl() {
++ // userMap.put("001", new User("001", "other-zhangsan", 18, new Date(1998-1900, 1, 2, 3, 4, 5), Gender.MAN));
++ userMap.put("001", new User("001", "other-zhangsan", 18, new Date(0x12345678), Gender.MAN));
++ userMap.put("002", new User("002", "other-lisi", 20, new Date(1996-1900, 1, 2, 3, 4, 5), Gender.MAN));
++ userMap.put("003", new User("003", "other-lily", 23, new Date(1993-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
++ userMap.put("004", new User("004", "other-lisa", 32, new Date(1985-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
++ }
++
++ public boolean isLimit(Gender gender, String name) {
++ logger.info(String.format("input gender=%sand name=%s", gender, name));
++ return Gender.MAN == gender;
++ }
++
++ public User GetUser(String userId) {
++ logger.info("input userId = " + userId);
++ return new User(userId, "Joe", 48);
++ }
++
++ public User GetUser0(String userId, String name) {
++ return new User(userId, name, 48);
++ }
++
++ public void GetUser3() {
++ logger.info("this is GetUser3 of another");
++ }
++
++ public User GetErr(String userId) throws Exception {
++ throw new Exception("exception");
++ }
++
++ public List<User> GetUsers(ArrayList<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ public Map<String, User> GetUserMap(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ Map<String, User> map = new HashMap<String, User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ map.put(id, userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return map;
++ }
++
++ public List<User> GetUsers(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ // @Override
++ public User getUser(int userCode) {
++ logger.info("input userCode = " + userCode);
++ return new User(String.valueOf(userCode), "userCode get", 48);
++ }
++
++ public User getUser(int usercode, String name) {
++ return new User(String.valueOf(usercode), name, 18);
++ }
++
++ public User queryUser(User user) {
++ logger.info("input com.dubbogo.user = " + user);
++ return new User(user.getId(), "get:" + user.getName(), user.getAge() + 18);
++ }
++
++ public Map<String, User> queryAll() {
++ logger.info("input");
++ Map<String, User> map = new HashMap<String, User>();
++ map.put("001", new User("001", "Joe", 18));
++ map.put("002", new User("002", "Wen", 20));
++
++ return map;
++ }
++
++ public int Calc(int a,int b) {
++ return a + b + 100;
++ }
++
++ public Response<Integer> Sum(int a,int b) {
++ return Response.ok(a+b);
++ }
++}
diff --cc general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderImpl.java
index bdb9651,0000000..1a4bb59
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderImpl.java
+++ b/general/dubbo/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderImpl.java
@@@ -1,115 -1,0 +1,115 @@@
- /*
- * 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;
-
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-
- import java.util.*;
-
- public class UserProviderImpl implements UserProvider {
- // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
- private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to com.dubbogo.user-server.log
- Map<String, User> userMap = new HashMap<String, User>();
-
- public UserProviderImpl() {
- userMap.put("A001", new User("A001", "demo-zhangsan", 18));
- userMap.put("A002", new User("A002", "demo-lisi", 20));
- userMap.put("A003", new User("A003", "demo-lily", 23));
- userMap.put("A004", new User("A004", "demo-lisa", 32));
- }
-
- public boolean isLimit(Gender gender, String name) {
- return Gender.WOMAN == gender;
- }
-
- public User GetUser(String userId) {
- return new User(userId, "zhangsan", 18);
- }
-
- public User GetErr(String userId) throws Exception {
- throw new Exception("exception");
- }
-
- public User GetUser0(String userId, String name) {
- return new User(userId, name, 18);
- }
-
- public List<User> GetUsers(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- LOG.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- LOG.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- public void GetUser3() {
- LOG.info("this is GetUser3 of impl");
- }
-
- public Map<String, User> GetUserMap(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- Map<String, User> map = new HashMap<String, User>();
- LOG.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- LOG.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- map.put(id, userMap.get(id));
- LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return map;
- }
-
- public User queryUser(User user) {
- return new User(user.getId(), "hello:" +user.getName(), user.getAge() + 18);
- }
-
- public Map<String, User> queryAll() {
- return userMap;
- }
-
-
- public User getUser(int userCode) {
- return new User(String.valueOf(userCode), "userCode get", 48);
- }
-
- public User getUser(int usercode, String name) {
- return new User(String.valueOf(usercode), name, 38);
- }
-
- public int Calc(int a,int b) {
- return a + b;
- }
-
- public Response<Integer> Sum(int a,int b) {
- return Response.ok(a+b);
- }
- }
++/*
++ * 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;
++
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++import java.util.*;
++
++public class UserProviderImpl implements UserProvider {
++ // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
++ private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to com.dubbogo.user-server.log
++ Map<String, User> userMap = new HashMap<String, User>();
++
++ public UserProviderImpl() {
++ userMap.put("A001", new User("A001", "demo-zhangsan", 18));
++ userMap.put("A002", new User("A002", "demo-lisi", 20));
++ userMap.put("A003", new User("A003", "demo-lily", 23));
++ userMap.put("A004", new User("A004", "demo-lisa", 32));
++ }
++
++ public boolean isLimit(Gender gender, String name) {
++ return Gender.WOMAN == gender;
++ }
++
++ public User GetUser(String userId) {
++ return new User(userId, "zhangsan", 18);
++ }
++
++ public User GetErr(String userId) throws Exception {
++ throw new Exception("exception");
++ }
++
++ public User GetUser0(String userId, String name) {
++ return new User(userId, name, 18);
++ }
++
++ public List<User> GetUsers(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ LOG.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ LOG.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ public void GetUser3() {
++ LOG.info("this is GetUser3 of impl");
++ }
++
++ public Map<String, User> GetUserMap(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ Map<String, User> map = new HashMap<String, User>();
++ LOG.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ LOG.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ map.put(id, userMap.get(id));
++ LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return map;
++ }
++
++ public User queryUser(User user) {
++ return new User(user.getId(), "hello:" +user.getName(), user.getAge() + 18);
++ }
++
++ public Map<String, User> queryAll() {
++ return userMap;
++ }
++
++
++ public User getUser(int userCode) {
++ return new User(String.valueOf(userCode), "userCode get", 48);
++ }
++
++ public User getUser(int usercode, String name) {
++ return new User(String.valueOf(usercode), name, 38);
++ }
++
++ public int Calc(int a,int b) {
++ return a + b;
++ }
++
++ public Response<Integer> Sum(int a,int b) {
++ return Response.ok(a+b);
++ }
++}
diff --cc general/dubbo/java-server/2.6/src/main/resources/META-INF/spring/dubbo.provider.xml
index cd63653,0000000..efad8af
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.6/src/main/resources/META-INF/spring/dubbo.provider.xml
+++ b/general/dubbo/java-server/2.6/src/main/resources/META-INF/spring/dubbo.provider.xml
@@@ -1,36 -1,0 +1,36 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
-
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
-
- <!-- 应用名 -->
- <dubbo:application name="user-info-server"/>
- <!-- 连接到哪个本地注册中心 -->
- <dubbo:registry id="dubbogo" address="zookeeper://127.0.0.1:2181" />
- <!-- 用dubbo协议在20880端口暴露服务 -->
- <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
- <!-- 声明需要暴露的服务接口 -->
- <dubbo:service id="aaa" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="demoService"/>
- <dubbo:service id="bbb" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" version="2.0"/>
- <dubbo:service id="ccc" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" group="as" version="2.0"/>
-
- <bean id="demoService" class="org.apache.dubbo.UserProviderImpl" />
- <bean id="otherService" class="org.apache.dubbo.UserProviderAnotherImpl"/>
-
- </beans>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++
++<beans xmlns="http://www.springframework.org/schema/beans"
++ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
++ xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
++ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
++ http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
++
++ <!-- 应用名 -->
++ <dubbo:application name="user-info-server"/>
++ <!-- 连接到哪个本地注册中心 -->
++ <dubbo:registry id="dubbogo" address="zookeeper://127.0.0.1:2181" />
++ <!-- 用dubbo协议在20880端口暴露服务 -->
++ <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
++ <!-- 声明需要暴露的服务接口 -->
++ <dubbo:service id="aaa" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="demoService"/>
++ <dubbo:service id="bbb" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" version="2.0"/>
++ <dubbo:service id="ccc" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" group="as" version="2.0"/>
++
++ <bean id="demoService" class="org.apache.dubbo.UserProviderImpl" />
++ <bean id="otherService" class="org.apache.dubbo.UserProviderAnotherImpl"/>
++
++</beans>
diff --cc general/dubbo/java-server/2.6/src/main/resources/log4j.properties
index 13c8049,0000000..806e33d
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.6/src/main/resources/log4j.properties
+++ b/general/dubbo/java-server/2.6/src/main/resources/log4j.properties
@@@ -1,20 -1,0 +1,20 @@@
- ## Logger configure file for myproject
- log.dir=logs/
- datestamp=yyyy-MM-dd/HH:mm:ss.SSS
-
- log4j.rootLogger=DEBUG, file, console
-
- log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.file.threshold=DEBUG
- log4j.appender.file.File=${log.dir}/log4j.log
- log4j.appender.file.DatePattern=-yyyyMMddHH
- log4j.appender.file.ImmediateFlush=true
- log4j.appender.file.Append=true
- log4j.appender.file.layout=org.apache.log4j.PatternLayout
- log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
- log4j.appender.console=org.apache.log4j.ConsoleAppender
- log4j.appender.console.Threshold=DEBUG
- log4j.appender.console.layout=org.apache.log4j.PatternLayout
- log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
++## Logger configure file for myproject
++log.dir=logs/
++datestamp=yyyy-MM-dd/HH:mm:ss.SSS
++
++log4j.rootLogger=DEBUG, file, console
++
++log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
++log4j.appender.file.threshold=DEBUG
++log4j.appender.file.File=${log.dir}/log4j.log
++log4j.appender.file.DatePattern=-yyyyMMddHH
++log4j.appender.file.ImmediateFlush=true
++log4j.appender.file.Append=true
++log4j.appender.file.layout=org.apache.log4j.PatternLayout
++log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
++log4j.appender.console=org.apache.log4j.ConsoleAppender
++log4j.appender.console.Threshold=DEBUG
++log4j.appender.console.layout=org.apache.log4j.PatternLayout
++log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
diff --cc general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/Gender.java
index 7b503cc,0000000..a016781
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/Gender.java
+++ b/general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/Gender.java
@@@ -1,23 -1,0 +1,23 @@@
- /*
- * 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;
-
- public enum Gender {
- MAN,
- WOMAN
- }
++/*
++ * 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;
++
++public enum Gender {
++ MAN,
++ WOMAN
++}
diff --cc general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/User.java
index 7fcfa38,0000000..039a883
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/User.java
+++ b/general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/User.java
@@@ -1,95 -1,0 +1,95 @@@
- /*
- * 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;
-
- import java.io.Serializable;
- import java.util.Date;
-
- public class User implements Serializable {
-
- private String id;
-
- private String name;
-
- private int age;
-
- private Date time = new Date();
-
- private Gender sex = Gender.MAN;
-
- public User() {
- }
-
- public User(String id, String name, int age) {
- this.id = id;
- this.name = name;
- this.age = age;
- }
-
- public User(String id, String name, int age, Date time, Gender sex) {
- this.id = id;
- this.name = name;
- this.age = age;
- this.time = time;
- this.sex = sex;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- 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 Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
- public Gender getSex() {
- return sex;
- }
-
- public void setSex(Gender sex) {
- this.sex = sex;
- }
-
- public String toString() {
- return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time + ", gender:" + sex + "}";
- }
- }
++/*
++ * 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;
++
++import java.io.Serializable;
++import java.util.Date;
++
++public class User implements Serializable {
++
++ private String id;
++
++ private String name;
++
++ private int age;
++
++ private Date time = new Date();
++
++ private Gender sex = Gender.MAN;
++
++ public User() {
++ }
++
++ public User(String id, String name, int age) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ }
++
++ public User(String id, String name, int age, Date time, Gender sex) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ this.time = time;
++ this.sex = sex;
++ }
++
++ public String getId() {
++ return id;
++ }
++
++ public void setId(String id) {
++ this.id = id;
++ }
++
++ 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 Date getTime() {
++ return time;
++ }
++
++ public void setTime(Date time) {
++ this.time = time;
++ }
++
++ public Gender getSex() {
++ return sex;
++ }
++
++ public void setSex(Gender sex) {
++ this.sex = sex;
++ }
++
++ public String toString() {
++ return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time + ", gender:" + sex + "}";
++ }
++}
diff --cc general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/UserProvider.java
index 1c13f05,0000000..5cd6ffe
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/UserProvider.java
+++ b/general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/UserProvider.java
@@@ -1,50 -1,0 +1,50 @@@
- /*
- * 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;
-
- import java.util.List;
- import java.util.Map;
-
- public interface UserProvider {
-
- boolean isLimit(Gender gender, String name);
-
- User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
-
- List<User> GetUsers(List<String> userIdList);
-
- void GetUser3();
-
- User GetUser0(String userId, String name);
-
- User GetErr(String userId) throws Exception;
-
- Map<String, User> GetUserMap(List<String> userIdList);
-
- User getUser(int usercode);
-
- User getUser(int usercode, String name);
-
- User queryUser(User user);
-
- Map<String, User> queryAll();
-
- int Calc(int a, int b);
-
- Response<Integer> Sum(int a, int b);
- }
++/*
++ * 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;
++
++import java.util.List;
++import java.util.Map;
++
++public interface UserProvider {
++
++ boolean isLimit(Gender gender, String name);
++
++ User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
++
++ List<User> GetUsers(List<String> userIdList);
++
++ void GetUser3();
++
++ User GetUser0(String userId, String name);
++
++ User GetErr(String userId) throws Exception;
++
++ Map<String, User> GetUserMap(List<String> userIdList);
++
++ User getUser(int usercode);
++
++ User getUser(int usercode, String name);
++
++ User queryUser(User user);
++
++ Map<String, User> queryAll();
++
++ int Calc(int a, int b);
++
++ Response<Integer> Sum(int a, int b);
++}
diff --cc general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
index cc6170e,0000000..3e2f9f2
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
+++ b/general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
@@@ -1,143 -1,0 +1,143 @@@
- /*
- * 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;
-
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-
- import java.util.*;
-
- public class UserProviderAnotherImpl implements UserProvider {
- // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
- private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to com.dubbogo.user-server.log
-
- private Map<String, User> userMap = new HashMap<String, User>();
-
- public UserProviderAnotherImpl() {
- // userMap.put("001", new User("001", "other-zhangsan", 18, new Date(1998-1900, 1, 2, 3, 4, 5), Gender.MAN));
- userMap.put("001", new User("001", "other-zhangsan", 18, new Date(0x12345678), Gender.MAN));
- userMap.put("002", new User("002", "other-lisi", 20, new Date(1996-1900, 1, 2, 3, 4, 5), Gender.MAN));
- userMap.put("003", new User("003", "other-lily", 23, new Date(1993-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
- userMap.put("004", new User("004", "other-lisa", 32, new Date(1985-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
- }
-
- public boolean isLimit(Gender gender, String name) {
- logger.info(String.format("input gender=%sand name=%s", gender, name));
- return Gender.MAN == gender;
- }
-
- public User GetUser(String userId) {
- logger.info("input userId = " + userId);
- return new User(userId, "Joe", 48);
- }
-
- public User GetUser0(String userId, String name) {
- return new User(userId, name, 48);
- }
-
- public void GetUser3() {
- logger.info("this is GetUser3 of another");
- }
-
- public User GetErr(String userId) throws Exception {
- throw new Exception("exception");
- }
-
- public List<User> GetUsers(ArrayList<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- public Map<String, User> GetUserMap(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- Map<String, User> map = new HashMap<String, User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- map.put(id, userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return map;
- }
-
- public List<User> GetUsers(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- // @Override
- public User getUser(int userCode) {
- logger.info("input userCode = " + userCode);
- return new User(String.valueOf(userCode), "userCode get", 48);
- }
-
- public User getUser(int usercode, String name) {
- return new User(String.valueOf(usercode), name, 18);
- }
-
- public User queryUser(User user) {
- logger.info("input com.dubbogo.user = " + user);
- return new User(user.getId(), "get:" + user.getName(), user.getAge() + 18);
- }
-
- public Map<String, User> queryAll() {
- logger.info("input");
- Map<String, User> map = new HashMap<String, User>();
- map.put("001", new User("001", "Joe", 18));
- map.put("002", new User("002", "Wen", 20));
-
- return map;
- }
-
- public int Calc(int a,int b) {
- return a + b + 100;
- }
-
- public Response<Integer> Sum(int a,int b) {
- return Response.ok(a+b);
- }
- }
++/*
++ * 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;
++
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++import java.util.*;
++
++public class UserProviderAnotherImpl implements UserProvider {
++ // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
++ private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to com.dubbogo.user-server.log
++
++ private Map<String, User> userMap = new HashMap<String, User>();
++
++ public UserProviderAnotherImpl() {
++ // userMap.put("001", new User("001", "other-zhangsan", 18, new Date(1998-1900, 1, 2, 3, 4, 5), Gender.MAN));
++ userMap.put("001", new User("001", "other-zhangsan", 18, new Date(0x12345678), Gender.MAN));
++ userMap.put("002", new User("002", "other-lisi", 20, new Date(1996-1900, 1, 2, 3, 4, 5), Gender.MAN));
++ userMap.put("003", new User("003", "other-lily", 23, new Date(1993-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
++ userMap.put("004", new User("004", "other-lisa", 32, new Date(1985-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
++ }
++
++ public boolean isLimit(Gender gender, String name) {
++ logger.info(String.format("input gender=%sand name=%s", gender, name));
++ return Gender.MAN == gender;
++ }
++
++ public User GetUser(String userId) {
++ logger.info("input userId = " + userId);
++ return new User(userId, "Joe", 48);
++ }
++
++ public User GetUser0(String userId, String name) {
++ return new User(userId, name, 48);
++ }
++
++ public void GetUser3() {
++ logger.info("this is GetUser3 of another");
++ }
++
++ public User GetErr(String userId) throws Exception {
++ throw new Exception("exception");
++ }
++
++ public List<User> GetUsers(ArrayList<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ public Map<String, User> GetUserMap(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ Map<String, User> map = new HashMap<String, User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ map.put(id, userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return map;
++ }
++
++ public List<User> GetUsers(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ // @Override
++ public User getUser(int userCode) {
++ logger.info("input userCode = " + userCode);
++ return new User(String.valueOf(userCode), "userCode get", 48);
++ }
++
++ public User getUser(int usercode, String name) {
++ return new User(String.valueOf(usercode), name, 18);
++ }
++
++ public User queryUser(User user) {
++ logger.info("input com.dubbogo.user = " + user);
++ return new User(user.getId(), "get:" + user.getName(), user.getAge() + 18);
++ }
++
++ public Map<String, User> queryAll() {
++ logger.info("input");
++ Map<String, User> map = new HashMap<String, User>();
++ map.put("001", new User("001", "Joe", 18));
++ map.put("002", new User("002", "Wen", 20));
++
++ return map;
++ }
++
++ public int Calc(int a,int b) {
++ return a + b + 100;
++ }
++
++ public Response<Integer> Sum(int a,int b) {
++ return Response.ok(a+b);
++ }
++}
diff --cc general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderImpl.java
index bdb9651,0000000..1a4bb59
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderImpl.java
+++ b/general/dubbo/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderImpl.java
@@@ -1,115 -1,0 +1,115 @@@
- /*
- * 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;
-
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-
- import java.util.*;
-
- public class UserProviderImpl implements UserProvider {
- // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
- private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to com.dubbogo.user-server.log
- Map<String, User> userMap = new HashMap<String, User>();
-
- public UserProviderImpl() {
- userMap.put("A001", new User("A001", "demo-zhangsan", 18));
- userMap.put("A002", new User("A002", "demo-lisi", 20));
- userMap.put("A003", new User("A003", "demo-lily", 23));
- userMap.put("A004", new User("A004", "demo-lisa", 32));
- }
-
- public boolean isLimit(Gender gender, String name) {
- return Gender.WOMAN == gender;
- }
-
- public User GetUser(String userId) {
- return new User(userId, "zhangsan", 18);
- }
-
- public User GetErr(String userId) throws Exception {
- throw new Exception("exception");
- }
-
- public User GetUser0(String userId, String name) {
- return new User(userId, name, 18);
- }
-
- public List<User> GetUsers(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- LOG.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- LOG.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- public void GetUser3() {
- LOG.info("this is GetUser3 of impl");
- }
-
- public Map<String, User> GetUserMap(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- Map<String, User> map = new HashMap<String, User>();
- LOG.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- LOG.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- map.put(id, userMap.get(id));
- LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return map;
- }
-
- public User queryUser(User user) {
- return new User(user.getId(), "hello:" +user.getName(), user.getAge() + 18);
- }
-
- public Map<String, User> queryAll() {
- return userMap;
- }
-
-
- public User getUser(int userCode) {
- return new User(String.valueOf(userCode), "userCode get", 48);
- }
-
- public User getUser(int usercode, String name) {
- return new User(String.valueOf(usercode), name, 38);
- }
-
- public int Calc(int a,int b) {
- return a + b;
- }
-
- public Response<Integer> Sum(int a,int b) {
- return Response.ok(a+b);
- }
- }
++/*
++ * 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;
++
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++import java.util.*;
++
++public class UserProviderImpl implements UserProvider {
++ // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
++ private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to com.dubbogo.user-server.log
++ Map<String, User> userMap = new HashMap<String, User>();
++
++ public UserProviderImpl() {
++ userMap.put("A001", new User("A001", "demo-zhangsan", 18));
++ userMap.put("A002", new User("A002", "demo-lisi", 20));
++ userMap.put("A003", new User("A003", "demo-lily", 23));
++ userMap.put("A004", new User("A004", "demo-lisa", 32));
++ }
++
++ public boolean isLimit(Gender gender, String name) {
++ return Gender.WOMAN == gender;
++ }
++
++ public User GetUser(String userId) {
++ return new User(userId, "zhangsan", 18);
++ }
++
++ public User GetErr(String userId) throws Exception {
++ throw new Exception("exception");
++ }
++
++ public User GetUser0(String userId, String name) {
++ return new User(userId, name, 18);
++ }
++
++ public List<User> GetUsers(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ LOG.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ LOG.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ public void GetUser3() {
++ LOG.info("this is GetUser3 of impl");
++ }
++
++ public Map<String, User> GetUserMap(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ Map<String, User> map = new HashMap<String, User>();
++ LOG.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ LOG.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ map.put(id, userMap.get(id));
++ LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return map;
++ }
++
++ public User queryUser(User user) {
++ return new User(user.getId(), "hello:" +user.getName(), user.getAge() + 18);
++ }
++
++ public Map<String, User> queryAll() {
++ return userMap;
++ }
++
++
++ public User getUser(int userCode) {
++ return new User(String.valueOf(userCode), "userCode get", 48);
++ }
++
++ public User getUser(int usercode, String name) {
++ return new User(String.valueOf(usercode), name, 38);
++ }
++
++ public int Calc(int a,int b) {
++ return a + b;
++ }
++
++ public Response<Integer> Sum(int a,int b) {
++ return Response.ok(a+b);
++ }
++}
diff --cc general/dubbo/java-server/2.7/src/main/resources/META-INF/spring/dubbo.provider.xml
index cd63653,0000000..efad8af
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.7/src/main/resources/META-INF/spring/dubbo.provider.xml
+++ b/general/dubbo/java-server/2.7/src/main/resources/META-INF/spring/dubbo.provider.xml
@@@ -1,36 -1,0 +1,36 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
-
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
-
- <!-- 应用名 -->
- <dubbo:application name="user-info-server"/>
- <!-- 连接到哪个本地注册中心 -->
- <dubbo:registry id="dubbogo" address="zookeeper://127.0.0.1:2181" />
- <!-- 用dubbo协议在20880端口暴露服务 -->
- <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
- <!-- 声明需要暴露的服务接口 -->
- <dubbo:service id="aaa" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="demoService"/>
- <dubbo:service id="bbb" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" version="2.0"/>
- <dubbo:service id="ccc" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" group="as" version="2.0"/>
-
- <bean id="demoService" class="org.apache.dubbo.UserProviderImpl" />
- <bean id="otherService" class="org.apache.dubbo.UserProviderAnotherImpl"/>
-
- </beans>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++
++<beans xmlns="http://www.springframework.org/schema/beans"
++ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
++ xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
++ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
++ http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
++
++ <!-- 应用名 -->
++ <dubbo:application name="user-info-server"/>
++ <!-- 连接到哪个本地注册中心 -->
++ <dubbo:registry id="dubbogo" address="zookeeper://127.0.0.1:2181" />
++ <!-- 用dubbo协议在20880端口暴露服务 -->
++ <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
++ <!-- 声明需要暴露的服务接口 -->
++ <dubbo:service id="aaa" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="demoService"/>
++ <dubbo:service id="bbb" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" version="2.0"/>
++ <dubbo:service id="ccc" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" group="as" version="2.0"/>
++
++ <bean id="demoService" class="org.apache.dubbo.UserProviderImpl" />
++ <bean id="otherService" class="org.apache.dubbo.UserProviderAnotherImpl"/>
++
++</beans>
diff --cc general/dubbo/java-server/2.7/src/main/resources/log4j.properties
index 13c8049,0000000..806e33d
mode 100644,000000..100644
--- a/general/dubbo/java-server/2.7/src/main/resources/log4j.properties
+++ b/general/dubbo/java-server/2.7/src/main/resources/log4j.properties
@@@ -1,20 -1,0 +1,20 @@@
- ## Logger configure file for myproject
- log.dir=logs/
- datestamp=yyyy-MM-dd/HH:mm:ss.SSS
-
- log4j.rootLogger=DEBUG, file, console
-
- log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.file.threshold=DEBUG
- log4j.appender.file.File=${log.dir}/log4j.log
- log4j.appender.file.DatePattern=-yyyyMMddHH
- log4j.appender.file.ImmediateFlush=true
- log4j.appender.file.Append=true
- log4j.appender.file.layout=org.apache.log4j.PatternLayout
- log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
- log4j.appender.console=org.apache.log4j.ConsoleAppender
- log4j.appender.console.Threshold=DEBUG
- log4j.appender.console.layout=org.apache.log4j.PatternLayout
- log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
++## Logger configure file for myproject
++log.dir=logs/
++datestamp=yyyy-MM-dd/HH:mm:ss.SSS
++
++log4j.rootLogger=DEBUG, file, console
++
++log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
++log4j.appender.file.threshold=DEBUG
++log4j.appender.file.File=${log.dir}/log4j.log
++log4j.appender.file.DatePattern=-yyyyMMddHH
++log4j.appender.file.ImmediateFlush=true
++log4j.appender.file.Append=true
++log4j.appender.file.layout=org.apache.log4j.PatternLayout
++log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
++log4j.appender.console=org.apache.log4j.ConsoleAppender
++log4j.appender.console.Threshold=DEBUG
++log4j.appender.console.layout=org.apache.log4j.PatternLayout
++log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
diff --cc general/grpc/stream/go-client/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/general/grpc/stream/go-client/profiles/dev/log.yml
+++ b/general/grpc/stream/go-client/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/grpc/stream/go-client/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/general/grpc/stream/go-client/profiles/release/log.yml
+++ b/general/grpc/stream/go-client/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "warn"
++development: true
++disableCaller: true
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/grpc/stream/go-client/profiles/test/log.yml
index baee0b7,0000000..f93d3c7
mode 100644,000000..100644
--- a/general/grpc/stream/go-client/profiles/test/log.yml
+++ b/general/grpc/stream/go-client/profiles/test/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "info"
- development: false
- disableCaller: false
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "info"
++development: false
++disableCaller: false
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/grpc/stream/go-server/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/general/grpc/stream/go-server/profiles/dev/log.yml
+++ b/general/grpc/stream/go-server/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/grpc/stream/go-server/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/general/grpc/stream/go-server/profiles/release/log.yml
+++ b/general/grpc/stream/go-server/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "warn"
++development: true
++disableCaller: true
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/grpc/stream/go-server/profiles/test/log.yml
index baee0b7,0000000..f93d3c7
mode 100644,000000..100644
--- a/general/grpc/stream/go-server/profiles/test/log.yml
+++ b/general/grpc/stream/go-server/profiles/test/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "info"
- development: false
- disableCaller: false
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "info"
++development: false
++disableCaller: false
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/grpc/unary/go-client/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/general/grpc/unary/go-client/profiles/dev/log.yml
+++ b/general/grpc/unary/go-client/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/grpc/unary/go-client/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/general/grpc/unary/go-client/profiles/release/log.yml
+++ b/general/grpc/unary/go-client/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "warn"
++development: true
++disableCaller: true
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/grpc/unary/go-client/profiles/test/log.yml
index baee0b7,0000000..f93d3c7
mode 100644,000000..100644
--- a/general/grpc/unary/go-client/profiles/test/log.yml
+++ b/general/grpc/unary/go-client/profiles/test/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "info"
- development: false
- disableCaller: false
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "info"
++development: false
++disableCaller: false
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/grpc/unary/go-server/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/general/grpc/unary/go-server/profiles/dev/log.yml
+++ b/general/grpc/unary/go-server/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/grpc/unary/go-server/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/general/grpc/unary/go-server/profiles/release/log.yml
+++ b/general/grpc/unary/go-server/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "warn"
++development: true
++disableCaller: true
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/grpc/unary/go-server/profiles/test/log.yml
index baee0b7,0000000..f93d3c7
mode 100644,000000..100644
--- a/general/grpc/unary/go-server/profiles/test/log.yml
+++ b/general/grpc/unary/go-server/profiles/test/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "info"
- development: false
- disableCaller: false
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "info"
++development: false
++disableCaller: false
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/jsonrpc/go-client/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/general/jsonrpc/go-client/profiles/dev/log.yml
+++ b/general/jsonrpc/go-client/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/jsonrpc/go-client/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/general/jsonrpc/go-client/profiles/release/log.yml
+++ b/general/jsonrpc/go-client/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "warn"
++development: true
++disableCaller: true
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/jsonrpc/go-client/profiles/test/log.yml
index baee0b7,0000000..f93d3c7
mode 100644,000000..100644
--- a/general/jsonrpc/go-client/profiles/test/log.yml
+++ b/general/jsonrpc/go-client/profiles/test/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "info"
- development: false
- disableCaller: false
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "info"
++development: false
++disableCaller: false
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/jsonrpc/go-server/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/general/jsonrpc/go-server/profiles/dev/log.yml
+++ b/general/jsonrpc/go-server/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/jsonrpc/go-server/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/general/jsonrpc/go-server/profiles/release/log.yml
+++ b/general/jsonrpc/go-server/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "warn"
++development: true
++disableCaller: true
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/jsonrpc/go-server/profiles/test/log.yml
index baee0b7,0000000..f93d3c7
mode 100644,000000..100644
--- a/general/jsonrpc/go-server/profiles/test/log.yml
+++ b/general/jsonrpc/go-server/profiles/test/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "info"
- development: false
- disableCaller: false
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "info"
++development: false
++disableCaller: false
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc general/jsonrpc/java-client/src/main/assembly/assembly.xml
index 47757d1,0000000..40c34d8
mode 100644,000000..100644
--- a/general/jsonrpc/java-client/src/main/assembly/assembly.xml
+++ b/general/jsonrpc/java-client/src/main/assembly/assembly.xml
@@@ -1,39 -1,0 +1,39 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
-
- <assembly>
- <id>assembly</id>
- <formats>
- <format>tar.gz</format>
- </formats>
- <includeBaseDirectory>true</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>${project.build.directory}/dubbo/META-INF/assembly/bin</directory>
- <outputDirectory>bin</outputDirectory>
- <fileMode>0755</fileMode>
- </fileSet>
- <fileSet>
- <directory>src/main/assembly/conf</directory>
- <outputDirectory>conf</outputDirectory>
- <fileMode>0644</fileMode>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <outputDirectory>lib</outputDirectory>
- </dependencySet>
- </dependencySets>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++
++<assembly>
++ <id>assembly</id>
++ <formats>
++ <format>tar.gz</format>
++ </formats>
++ <includeBaseDirectory>true</includeBaseDirectory>
++ <fileSets>
++ <fileSet>
++ <directory>${project.build.directory}/dubbo/META-INF/assembly/bin</directory>
++ <outputDirectory>bin</outputDirectory>
++ <fileMode>0755</fileMode>
++ </fileSet>
++ <fileSet>
++ <directory>src/main/assembly/conf</directory>
++ <outputDirectory>conf</outputDirectory>
++ <fileMode>0644</fileMode>
++ </fileSet>
++ </fileSets>
++ <dependencySets>
++ <dependencySet>
++ <outputDirectory>lib</outputDirectory>
++ </dependencySet>
++ </dependencySets>
+</assembly>
diff --cc general/jsonrpc/java-client/src/main/assembly/conf/dubbo.properties
index fc7b9ae,0000000..73da0df
mode 100644,000000..100644
--- a/general/jsonrpc/java-client/src/main/assembly/conf/dubbo.properties
+++ b/general/jsonrpc/java-client/src/main/assembly/conf/dubbo.properties
@@@ -1,13 -1,0 +1,13 @@@
- ### dubboע���������� ###
- dubbo.container = log4j,spring
- dubbo.application.name = user-info-client
- dubbo.application.owner = AlexStocks
- dubbo.application.environment = product
- dubbo.registry.address = zookeeper://127.0.0.1:2181
- dubbo.monitor.protocol = zookeeper
- dubbo.consumer.timeout = 10000
- dubbo.provider.timeout = 10000
- dubbo.protocol.name = jsonrpc
-
- dubbo.log4j.file = logs/client.log
- dubbo.log4j.level = WARN
++### dubboע���������� ###
++dubbo.container = log4j,spring
++dubbo.application.name = user-info-client
++dubbo.application.owner = AlexStocks
++dubbo.application.environment = product
++dubbo.registry.address = zookeeper://127.0.0.1:2181
++dubbo.monitor.protocol = zookeeper
++dubbo.consumer.timeout = 10000
++dubbo.provider.timeout = 10000
++dubbo.protocol.name = jsonrpc
++
++dubbo.log4j.file = logs/client.log
++dubbo.log4j.level = WARN
diff --cc general/jsonrpc/java-client/src/main/java/com/ikurento/user/Gender.java
index e606be7,0000000..e74a5d4
mode 100644,000000..100644
--- a/general/jsonrpc/java-client/src/main/java/com/ikurento/user/Gender.java
+++ b/general/jsonrpc/java-client/src/main/java/com/ikurento/user/Gender.java
@@@ -1,23 -1,0 +1,23 @@@
- /*
- * 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.ikurento.user;
-
- public enum Gender {
- MAN,
- WOMAN
- }
++/*
++ * 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.ikurento.user;
++
++public enum Gender {
++ MAN,
++ WOMAN
++}
diff --cc general/jsonrpc/java-client/src/main/java/com/ikurento/user/User.java
index 7f228b3,0000000..68556cc
mode 100644,000000..100644
--- a/general/jsonrpc/java-client/src/main/java/com/ikurento/user/User.java
+++ b/general/jsonrpc/java-client/src/main/java/com/ikurento/user/User.java
@@@ -1,83 -1,0 +1,83 @@@
- /*
- * 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.ikurento.user;
-
- import java.util.Date;
-
- public class User {
-
- private String id;
-
- private String name;
-
- private int age;
-
- private Date time = new Date();
-
- private Gender sex = Gender.MAN;
-
- public User() {
- }
-
-
- public User(String id, String name, int age) {
- this.id = id;
- this.name = name;
- this.age = age;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- 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 Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
- public Gender getSex() {
- return sex;
- }
-
- public void setSex(Gender sex) {
- this.sex = sex;
- }
- }
++/*
++ * 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.ikurento.user;
++
++import java.util.Date;
++
++public class User {
++
++ private String id;
++
++ private String name;
++
++ private int age;
++
++ private Date time = new Date();
++
++ private Gender sex = Gender.MAN;
++
++ public User() {
++ }
++
++
++ public User(String id, String name, int age) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ }
++
++ public String getId() {
++ return id;
++ }
++
++ public void setId(String id) {
++ this.id = id;
++ }
++
++ 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 Date getTime() {
++ return time;
++ }
++
++ public void setTime(Date time) {
++ this.time = time;
++ }
++
++ public Gender getSex() {
++ return sex;
++ }
++
++ public void setSex(Gender sex) {
++ this.sex = sex;
++ }
++}
diff --cc general/jsonrpc/java-client/src/main/java/com/ikurento/user/UserProvider.java
index 5518577,0000000..70fdcb0
mode 100644,000000..100644
--- a/general/jsonrpc/java-client/src/main/java/com/ikurento/user/UserProvider.java
+++ b/general/jsonrpc/java-client/src/main/java/com/ikurento/user/UserProvider.java
@@@ -1,25 -1,0 +1,25 @@@
- /*
- * 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.
- */
-
- package com.ikurento.user;
-
- import java.util.List;
-
- public interface UserProvider {
- User GetUser(String userId);
- User getUser(int usercode);
- void GetUser3();
- List<User> GetUsers(List<String> userIdList);
- User GetUser0(String userId, String name);
- }
++/*
++ * 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.
++ */
++
++package com.ikurento.user;
++
++import java.util.List;
++
++public interface UserProvider {
++ User GetUser(String userId);
++ User getUser(int usercode);
++ void GetUser3();
++ List<User> GetUsers(List<String> userIdList);
++ User GetUser0(String userId, String name);
++}
diff --cc general/jsonrpc/java-client/src/main/resources/META-INF/spring/service.xml
index 854d513,0000000..c7d82c4
mode 100644,000000..100644
--- a/general/jsonrpc/java-client/src/main/resources/META-INF/spring/service.xml
+++ b/general/jsonrpc/java-client/src/main/resources/META-INF/spring/service.xml
@@@ -1,38 -1,0 +1,38 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
-
- <bean class="com.ikurento.user.Consumer" init-method="start">
- <!-- 声明这个类 要使用的服务名-->
- <property name="userProvider" ref="userProvider" />
- <property name="userProvider1" ref="userProvider1" />
- <property name="userProvider2" ref="userProvider2" />
- </bean>
-
- <!-- App config -->
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
- <property name="locations">
- <list>
- <value>classpath:dubbo.properties</value>
- </list>
- </property>
- </bean>
-
- </beans>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++<beans xmlns="http://www.springframework.org/schema/beans"
++ xmlns:context="http://www.springframework.org/schema/context"
++ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
++ xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
++ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
++ http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
++
++ <bean class="com.ikurento.user.Consumer" init-method="start">
++ <!-- 声明这个类 要使用的服务名-->
++ <property name="userProvider" ref="userProvider" />
++ <property name="userProvider1" ref="userProvider1" />
++ <property name="userProvider2" ref="userProvider2" />
++ </bean>
++
++ <!-- App config -->
++ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
++ <property name="locations">
++ <list>
++ <value>classpath:dubbo.properties</value>
++ </list>
++ </property>
++ </bean>
++
++</beans>
diff --cc general/jsonrpc/java-client/src/main/resources/dubbo.properties
index fc7b9ae,0000000..73da0df
mode 100644,000000..100644
--- a/general/jsonrpc/java-client/src/main/resources/dubbo.properties
+++ b/general/jsonrpc/java-client/src/main/resources/dubbo.properties
@@@ -1,13 -1,0 +1,13 @@@
- ### dubboע���������� ###
- dubbo.container = log4j,spring
- dubbo.application.name = user-info-client
- dubbo.application.owner = AlexStocks
- dubbo.application.environment = product
- dubbo.registry.address = zookeeper://127.0.0.1:2181
- dubbo.monitor.protocol = zookeeper
- dubbo.consumer.timeout = 10000
- dubbo.provider.timeout = 10000
- dubbo.protocol.name = jsonrpc
-
- dubbo.log4j.file = logs/client.log
- dubbo.log4j.level = WARN
++### dubboע���������� ###
++dubbo.container = log4j,spring
++dubbo.application.name = user-info-client
++dubbo.application.owner = AlexStocks
++dubbo.application.environment = product
++dubbo.registry.address = zookeeper://127.0.0.1:2181
++dubbo.monitor.protocol = zookeeper
++dubbo.consumer.timeout = 10000
++dubbo.provider.timeout = 10000
++dubbo.protocol.name = jsonrpc
++
++dubbo.log4j.file = logs/client.log
++dubbo.log4j.level = WARN
diff --cc general/jsonrpc/java-server/src/main/assembly/assembly.xml
index 98a2e10,0000000..7947c65
mode 100644,000000..100644
--- a/general/jsonrpc/java-server/src/main/assembly/assembly.xml
+++ b/general/jsonrpc/java-server/src/main/assembly/assembly.xml
@@@ -1,45 -1,0 +1,45 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
-
- <assembly>
- <id>assembly</id>
- <formats>
- <format>tar.gz</format>
- </formats>
- <includeBaseDirectory>true</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>${project.build.directory}/dubbo/META-INF/assembly/bin</directory>
- <outputDirectory>bin</outputDirectory>
- <fileMode>0755</fileMode>
- <directoryMode>0755</directoryMode>
- </fileSet>
- <fileSet>
- <directory>src/main/assembly/conf</directory>
- <includes>
- <include>dubbo.properties</include>
- <include>log4j.*</include>
- </includes>
- <outputDirectory>conf</outputDirectory>
- <fileMode>0644</fileMode>
- <directoryMode>0755</directoryMode>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <outputDirectory>lib</outputDirectory>
- </dependencySet>
- </dependencySets>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++
++<assembly>
++ <id>assembly</id>
++ <formats>
++ <format>tar.gz</format>
++ </formats>
++ <includeBaseDirectory>true</includeBaseDirectory>
++ <fileSets>
++ <fileSet>
++ <directory>${project.build.directory}/dubbo/META-INF/assembly/bin</directory>
++ <outputDirectory>bin</outputDirectory>
++ <fileMode>0755</fileMode>
++ <directoryMode>0755</directoryMode>
++ </fileSet>
++ <fileSet>
++ <directory>src/main/assembly/conf</directory>
++ <includes>
++ <include>dubbo.properties</include>
++ <include>log4j.*</include>
++ </includes>
++ <outputDirectory>conf</outputDirectory>
++ <fileMode>0644</fileMode>
++ <directoryMode>0755</directoryMode>
++ </fileSet>
++ </fileSets>
++ <dependencySets>
++ <dependencySet>
++ <outputDirectory>lib</outputDirectory>
++ </dependencySet>
++ </dependencySets>
+</assembly>
diff --cc general/jsonrpc/java-server/src/main/assembly/conf/dubbo.properties
index 627a3d9,0000000..2f19930
mode 100644,000000..100644
--- a/general/jsonrpc/java-server/src/main/assembly/conf/dubbo.properties
+++ b/general/jsonrpc/java-server/src/main/assembly/conf/dubbo.properties
@@@ -1,14 -1,0 +1,14 @@@
- ### dubbo注册中心配置 ##
- dubbo.container = log4j,spring
- dubbo.application.name = user-info-server
- dubbo.application.environment = product
- dubbo.application.owner = AlexStocks
- dubbo.registry.address = 127.0.0.1:2181
- dubbo.registry.protocol = zookeeper
- dubbo.consumer.timeout = 10000
- dubbo.provider.timeout = 10000
- dubbo.protocol.name = jsonrpc
- dubbo.protocol.port = 10000
-
- dubbo.log4j.file = logs/dubbo.log
- dubbo.log4j.level = INFO
++### dubbo注册中心配置 ##
++dubbo.container = log4j,spring
++dubbo.application.name = user-info-server
++dubbo.application.environment = product
++dubbo.application.owner = AlexStocks
++dubbo.registry.address = 127.0.0.1:2181
++dubbo.registry.protocol = zookeeper
++dubbo.consumer.timeout = 10000
++dubbo.provider.timeout = 10000
++dubbo.protocol.name = jsonrpc
++dubbo.protocol.port = 10000
++
++dubbo.log4j.file = logs/dubbo.log
++dubbo.log4j.level = INFO
diff --cc general/jsonrpc/java-server/src/main/assembly/conf/log4j.properties
index 13c8049,0000000..806e33d
mode 100644,000000..100644
--- a/general/jsonrpc/java-server/src/main/assembly/conf/log4j.properties
+++ b/general/jsonrpc/java-server/src/main/assembly/conf/log4j.properties
@@@ -1,20 -1,0 +1,20 @@@
- ## Logger configure file for myproject
- log.dir=logs/
- datestamp=yyyy-MM-dd/HH:mm:ss.SSS
-
- log4j.rootLogger=DEBUG, file, console
-
- log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.file.threshold=DEBUG
- log4j.appender.file.File=${log.dir}/log4j.log
- log4j.appender.file.DatePattern=-yyyyMMddHH
- log4j.appender.file.ImmediateFlush=true
- log4j.appender.file.Append=true
- log4j.appender.file.layout=org.apache.log4j.PatternLayout
- log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
- log4j.appender.console=org.apache.log4j.ConsoleAppender
- log4j.appender.console.Threshold=DEBUG
- log4j.appender.console.layout=org.apache.log4j.PatternLayout
- log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
++## Logger configure file for myproject
++log.dir=logs/
++datestamp=yyyy-MM-dd/HH:mm:ss.SSS
++
++log4j.rootLogger=DEBUG, file, console
++
++log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
++log4j.appender.file.threshold=DEBUG
++log4j.appender.file.File=${log.dir}/log4j.log
++log4j.appender.file.DatePattern=-yyyyMMddHH
++log4j.appender.file.ImmediateFlush=true
++log4j.appender.file.Append=true
++log4j.appender.file.layout=org.apache.log4j.PatternLayout
++log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
++log4j.appender.console=org.apache.log4j.ConsoleAppender
++log4j.appender.console.Threshold=DEBUG
++log4j.appender.console.layout=org.apache.log4j.PatternLayout
++log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
diff --cc general/jsonrpc/java-server/src/main/java/com/ikurento/user/Gender.java
index e606be7,0000000..e74a5d4
mode 100644,000000..100644
--- a/general/jsonrpc/java-server/src/main/java/com/ikurento/user/Gender.java
+++ b/general/jsonrpc/java-server/src/main/java/com/ikurento/user/Gender.java
@@@ -1,23 -1,0 +1,23 @@@
- /*
- * 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.ikurento.user;
-
- public enum Gender {
- MAN,
- WOMAN
- }
++/*
++ * 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.ikurento.user;
++
++public enum Gender {
++ MAN,
++ WOMAN
++}
diff --cc general/jsonrpc/java-server/src/main/java/com/ikurento/user/User.java
index a6e76cf,0000000..7af1c9c
mode 100644,000000..100644
--- a/general/jsonrpc/java-server/src/main/java/com/ikurento/user/User.java
+++ b/general/jsonrpc/java-server/src/main/java/com/ikurento/user/User.java
@@@ -1,95 -1,0 +1,95 @@@
- /*
- * 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.ikurento.user;
-
- import java.util.Date;
- import java.io.Serializable;
-
- public class User implements Serializable {
-
- private String id;
-
- private String name;
-
- private int age;
-
- private Date time = new Date();
-
- private Gender sex = Gender.MAN;
-
- public User() {
- }
-
- public User(String id, String name, int age) {
- this.id = id;
- this.name = name;
- this.age = age;
- }
-
- public User(String id, String name, int age, Date time, Gender sex) {
- this.id = id;
- this.name = name;
- this.age = age;
- this.time = time;
- this.sex = sex;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- 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 Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
- public Gender getSex() {
- return sex;
- }
-
- public void setSex(Gender sex) {
- this.sex = sex;
- }
-
- public String toString() {
- return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time + ", gender:" + sex + "}";
- }
- }
++/*
++ * 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.ikurento.user;
++
++import java.util.Date;
++import java.io.Serializable;
++
++public class User implements Serializable {
++
++ private String id;
++
++ private String name;
++
++ private int age;
++
++ private Date time = new Date();
++
++ private Gender sex = Gender.MAN;
++
++ public User() {
++ }
++
++ public User(String id, String name, int age) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ }
++
++ public User(String id, String name, int age, Date time, Gender sex) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ this.time = time;
++ this.sex = sex;
++ }
++
++ public String getId() {
++ return id;
++ }
++
++ public void setId(String id) {
++ this.id = id;
++ }
++
++ 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 Date getTime() {
++ return time;
++ }
++
++ public void setTime(Date time) {
++ this.time = time;
++ }
++
++ public Gender getSex() {
++ return sex;
++ }
++
++ public void setSex(Gender sex) {
++ this.sex = sex;
++ }
++
++ public String toString() {
++ return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time + ", gender:" + sex + "}";
++ }
++}
diff --cc general/jsonrpc/java-server/src/main/java/com/ikurento/user/UserProvider.java
index 2958a1a,0000000..96e1003
mode 100644,000000..100644
--- a/general/jsonrpc/java-server/src/main/java/com/ikurento/user/UserProvider.java
+++ b/general/jsonrpc/java-server/src/main/java/com/ikurento/user/UserProvider.java
@@@ -1,46 -1,0 +1,46 @@@
- /*
- * 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.ikurento.user;
-
- import java.util.List;
- import java.util.Map;
-
- public interface UserProvider {
-
- boolean isLimit(Gender gender, String name);
-
- User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
-
- List<User> GetUsers(List<String> userIdList);
-
- User GetUser0(String userId, String name);
-
- void GetUser3();
-
- Map<String, User> GetUserMap(List<String> userIdList);
-
- User getUser(int usercode);
-
- User queryUser(User user);
-
- Map<String, User> queryAll();
-
- int Calc(int a,int b);
-
- Response<Integer> Sum(int a, int b);
- }
++/*
++ * 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.ikurento.user;
++
++import java.util.List;
++import java.util.Map;
++
++public interface UserProvider {
++
++ boolean isLimit(Gender gender, String name);
++
++ User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
++
++ List<User> GetUsers(List<String> userIdList);
++
++ User GetUser0(String userId, String name);
++
++ void GetUser3();
++
++ Map<String, User> GetUserMap(List<String> userIdList);
++
++ User getUser(int usercode);
++
++ User queryUser(User user);
++
++ Map<String, User> queryAll();
++
++ int Calc(int a,int b);
++
++ Response<Integer> Sum(int a, int b);
++}
diff --cc general/jsonrpc/java-server/src/main/java/com/ikurento/user/UserProviderAnotherImpl.java
index 299feb7,0000000..3f62086
mode 100644,000000..100644
--- a/general/jsonrpc/java-server/src/main/java/com/ikurento/user/UserProviderAnotherImpl.java
+++ b/general/jsonrpc/java-server/src/main/java/com/ikurento/user/UserProviderAnotherImpl.java
@@@ -1,134 -1,0 +1,134 @@@
- /*
- * 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.ikurento.user;
-
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-
- import java.util.*;
-
- public class UserProviderAnotherImpl implements UserProvider {
- // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
- private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to user-server.log
-
- private Map<String, User> userMap = new HashMap<String, User>();
-
- public UserProviderAnotherImpl() {
- // userMap.put("001", new User("001", "other-zhangsan", 18, new Date(1998-1900, 1, 2, 3, 4, 5), Gender.MAN));
- userMap.put("001", new User("001", "other-zhangsan", 18, new Date(0x12345678), Gender.MAN));
- userMap.put("002", new User("002", "other-lisi", 20, new Date(1996-1900, 1, 2, 3, 4, 5), Gender.MAN));
- userMap.put("003", new User("003", "other-lily", 23, new Date(1993-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
- userMap.put("004", new User("004", "other-lisa", 32, new Date(1985-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
- }
-
- public boolean isLimit(Gender gender, String name) {
- logger.info(String.format("input gender=%sand name=%s", gender, name));
- return Gender.MAN == gender;
- }
-
- public User GetUser(String userId) {
- logger.info("input userId = " + userId);
- return new User(userId, "Joe", 48);
- }
-
- public User GetUser0(String userId, String name) {
- return new User(userId, name, 48);
- }
-
- public void GetUser3() {
- }
-
- public List<User> GetUsers(ArrayList<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- logger.info("id:" + id + ", user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- public Map<String, User> GetUserMap(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- Map<String, User> map = new HashMap<String, User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- map.put(id, userMap.get(id));
- logger.info("id:" + id + ", user:" + userMap.get(id));
- }
- }
-
- return map;
- }
-
- public List<User> GetUsers(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- logger.info("id:" + id + ", user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- // @Override
- public User getUser(int userCode) {
- logger.info("input userCode = " + userCode);
- return new User(String.valueOf(userCode), "userCode get", 48);
- }
-
- public User queryUser(User user) {
- logger.info("input user = " + user);
- return new User(user.getId(), "get:" + user.getName(), user.getAge() + 18);
- }
-
- public Map<String, User> queryAll() {
- logger.info("input");
- Map<String, User> map = new HashMap<String, User>();
- map.put("001", new User("001", "Joe", 18));
- map.put("002", new User("002", "Wen", 20));
-
- return map;
- }
-
- public int Calc(int a,int b) {
- return a + b + 100;
- }
-
- public Response<Integer> Sum(int a,int b) {
- return Response.ok(a+b);
- }
- }
++/*
++ * 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.ikurento.user;
++
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++import java.util.*;
++
++public class UserProviderAnotherImpl implements UserProvider {
++ // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
++ private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to user-server.log
++
++ private Map<String, User> userMap = new HashMap<String, User>();
++
++ public UserProviderAnotherImpl() {
++ // userMap.put("001", new User("001", "other-zhangsan", 18, new Date(1998-1900, 1, 2, 3, 4, 5), Gender.MAN));
++ userMap.put("001", new User("001", "other-zhangsan", 18, new Date(0x12345678), Gender.MAN));
++ userMap.put("002", new User("002", "other-lisi", 20, new Date(1996-1900, 1, 2, 3, 4, 5), Gender.MAN));
++ userMap.put("003", new User("003", "other-lily", 23, new Date(1993-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
++ userMap.put("004", new User("004", "other-lisa", 32, new Date(1985-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
++ }
++
++ public boolean isLimit(Gender gender, String name) {
++ logger.info(String.format("input gender=%sand name=%s", gender, name));
++ return Gender.MAN == gender;
++ }
++
++ public User GetUser(String userId) {
++ logger.info("input userId = " + userId);
++ return new User(userId, "Joe", 48);
++ }
++
++ public User GetUser0(String userId, String name) {
++ return new User(userId, name, 48);
++ }
++
++ public void GetUser3() {
++ }
++
++ public List<User> GetUsers(ArrayList<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ logger.info("id:" + id + ", user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ public Map<String, User> GetUserMap(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ Map<String, User> map = new HashMap<String, User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ map.put(id, userMap.get(id));
++ logger.info("id:" + id + ", user:" + userMap.get(id));
++ }
++ }
++
++ return map;
++ }
++
++ public List<User> GetUsers(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ logger.info("id:" + id + ", user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ // @Override
++ public User getUser(int userCode) {
++ logger.info("input userCode = " + userCode);
++ return new User(String.valueOf(userCode), "userCode get", 48);
++ }
++
++ public User queryUser(User user) {
++ logger.info("input user = " + user);
++ return new User(user.getId(), "get:" + user.getName(), user.getAge() + 18);
++ }
++
++ public Map<String, User> queryAll() {
++ logger.info("input");
++ Map<String, User> map = new HashMap<String, User>();
++ map.put("001", new User("001", "Joe", 18));
++ map.put("002", new User("002", "Wen", 20));
++
++ return map;
++ }
++
++ public int Calc(int a,int b) {
++ return a + b + 100;
++ }
++
++ public Response<Integer> Sum(int a,int b) {
++ return Response.ok(a+b);
++ }
++}
diff --cc general/jsonrpc/java-server/src/main/java/com/ikurento/user/UserProviderImpl.java
index ac6c229,0000000..3e08095
mode 100644,000000..100644
--- a/general/jsonrpc/java-server/src/main/java/com/ikurento/user/UserProviderImpl.java
+++ b/general/jsonrpc/java-server/src/main/java/com/ikurento/user/UserProviderImpl.java
@@@ -1,111 -1,0 +1,111 @@@
- /*
- * 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.ikurento.user;
-
- import java.util.HashMap;
- import java.util.List;
- import java.util.ArrayList;
- import java.util.Map;
- import java.util.Iterator;
-
- // import org.apache.log4j.Logger;
- // import org.apache.log4j.LoggerFactory;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-
- public class UserProviderImpl implements UserProvider {
- // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
- private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to user-server.log
- Map<String, User> userMap = new HashMap<String, User>();
-
- public UserProviderImpl() {
- userMap.put("A001", new User("A001", "demo-zhangsan", 18));
- userMap.put("A002", new User("A002", "demo-lisi", 20));
- userMap.put("A003", new User("A003", "demo-lily", 23));
- userMap.put("A004", new User("A004", "demo-lisa", 32));
- }
-
- public boolean isLimit(Gender gender, String name) {
- return Gender.WOMAN == gender;
- }
-
- public User GetUser(String userId) {
- return new User(userId, "zhangsan", 18);
- }
-
- public User GetUser0(String userId, String name) {
- return new User(userId, name, 18);
- }
-
- public List<User> GetUsers(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- LOG.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- LOG.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- LOG.info("id:" + id + ", user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- public Map<String, User> GetUserMap(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- Map<String, User> map = new HashMap<String, User>();
- LOG.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- LOG.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- map.put(id, userMap.get(id));
- LOG.info("id:" + id + ", user:" + userMap.get(id));
- }
- }
-
- return map;
- }
-
- public User queryUser(User user) {
- return new User(user.getId(), "hello:" +user.getName(), user.getAge() + 18);
- }
-
- public Map<String, User> queryAll() {
- return userMap;
- }
- public void GetUser3() {
- }
-
- public User getUser(int userCode) {
- return new User(String.valueOf(userCode), "userCode get", 48);
- }
-
-
- public int Calc(int a,int b) {
- return a + b;
- }
-
- public Response<Integer> Sum(int a,int b) {
- return Response.ok(a+b);
- }
- }
++/*
++ * 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.ikurento.user;
++
++import java.util.HashMap;
++import java.util.List;
++import java.util.ArrayList;
++import java.util.Map;
++import java.util.Iterator;
++
++// import org.apache.log4j.Logger;
++// import org.apache.log4j.LoggerFactory;
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++public class UserProviderImpl implements UserProvider {
++ // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
++ private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to user-server.log
++ Map<String, User> userMap = new HashMap<String, User>();
++
++ public UserProviderImpl() {
++ userMap.put("A001", new User("A001", "demo-zhangsan", 18));
++ userMap.put("A002", new User("A002", "demo-lisi", 20));
++ userMap.put("A003", new User("A003", "demo-lily", 23));
++ userMap.put("A004", new User("A004", "demo-lisa", 32));
++ }
++
++ public boolean isLimit(Gender gender, String name) {
++ return Gender.WOMAN == gender;
++ }
++
++ public User GetUser(String userId) {
++ return new User(userId, "zhangsan", 18);
++ }
++
++ public User GetUser0(String userId, String name) {
++ return new User(userId, name, 18);
++ }
++
++ public List<User> GetUsers(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ LOG.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ LOG.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ LOG.info("id:" + id + ", user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ public Map<String, User> GetUserMap(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ Map<String, User> map = new HashMap<String, User>();
++ LOG.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ LOG.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ map.put(id, userMap.get(id));
++ LOG.info("id:" + id + ", user:" + userMap.get(id));
++ }
++ }
++
++ return map;
++ }
++
++ public User queryUser(User user) {
++ return new User(user.getId(), "hello:" +user.getName(), user.getAge() + 18);
++ }
++
++ public Map<String, User> queryAll() {
++ return userMap;
++ }
++ public void GetUser3() {
++ }
++
++ public User getUser(int userCode) {
++ return new User(String.valueOf(userCode), "userCode get", 48);
++ }
++
++
++ public int Calc(int a,int b) {
++ return a + b;
++ }
++
++ public Response<Integer> Sum(int a,int b) {
++ return Response.ok(a+b);
++ }
++}
diff --cc general/jsonrpc/java-server/src/main/resources/META-INF/spring/dubbo.provider.xml
index f9ebc08,0000000..d3cf037
mode 100644,000000..100644
--- a/general/jsonrpc/java-server/src/main/resources/META-INF/spring/dubbo.provider.xml
+++ b/general/jsonrpc/java-server/src/main/resources/META-INF/spring/dubbo.provider.xml
@@@ -1,39 -1,0 +1,39 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
-
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
-
- <!-- 应用名 -->
- <dubbo:application name="user-info-server"/>
- <!-- 连接到哪个本地注册中心 -->
- <dubbo:registry id="ikurento" address="zookeeper://127.0.0.1:2181" />
- <dubbo:registry id="ikurento2" address="zookeeper://127.0.0.1:2182" />
- <!-- 用dubbo协议在20880端口暴露服务 -->
- <!-- dubbo:protocol host="127.0.0.1" / -->
- <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
- <dubbo:protocol id="jsonrpc" name="jsonrpc" host="127.0.0.1" port="10010" />
- <!-- 声明需要暴露的服务接口 -->
- <dubbo:service registry="ikurento" timeout="3000" interface="com.ikurento.user.UserProvider" ref="demoService"/>
- <dubbo:service registry="ikurento" timeout="3000" interface="com.ikurento.user.UserProvider" ref="otherService" version="2.0"/>
- <dubbo:service registry="ikurento" timeout="3000" interface="com.ikurento.user.UserProvider" ref="otherService" group="as" version="2.0"/>
-
- <bean id="demoService" class="com.ikurento.user.UserProviderImpl" />
- <bean id="otherService" class="com.ikurento.user.UserProviderAnotherImpl"/>
-
- </beans>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++
++<beans xmlns="http://www.springframework.org/schema/beans"
++ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
++ xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
++ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
++ http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
++
++ <!-- 应用名 -->
++ <dubbo:application name="user-info-server"/>
++ <!-- 连接到哪个本地注册中心 -->
++ <dubbo:registry id="ikurento" address="zookeeper://127.0.0.1:2181" />
++ <dubbo:registry id="ikurento2" address="zookeeper://127.0.0.1:2182" />
++ <!-- 用dubbo协议在20880端口暴露服务 -->
++ <!-- dubbo:protocol host="127.0.0.1" / -->
++ <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
++ <dubbo:protocol id="jsonrpc" name="jsonrpc" host="127.0.0.1" port="10010" />
++ <!-- 声明需要暴露的服务接口 -->
++ <dubbo:service registry="ikurento" timeout="3000" interface="com.ikurento.user.UserProvider" ref="demoService"/>
++ <dubbo:service registry="ikurento" timeout="3000" interface="com.ikurento.user.UserProvider" ref="otherService" version="2.0"/>
++ <dubbo:service registry="ikurento" timeout="3000" interface="com.ikurento.user.UserProvider" ref="otherService" group="as" version="2.0"/>
++
++ <bean id="demoService" class="com.ikurento.user.UserProviderImpl" />
++ <bean id="otherService" class="com.ikurento.user.UserProviderAnotherImpl"/>
++
++</beans>
diff --cc general/jsonrpc/java-server/src/main/resources/log4j.properties
index 13c8049,0000000..806e33d
mode 100644,000000..100644
--- a/general/jsonrpc/java-server/src/main/resources/log4j.properties
+++ b/general/jsonrpc/java-server/src/main/resources/log4j.properties
@@@ -1,20 -1,0 +1,20 @@@
- ## Logger configure file for myproject
- log.dir=logs/
- datestamp=yyyy-MM-dd/HH:mm:ss.SSS
-
- log4j.rootLogger=DEBUG, file, console
-
- log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.file.threshold=DEBUG
- log4j.appender.file.File=${log.dir}/log4j.log
- log4j.appender.file.DatePattern=-yyyyMMddHH
- log4j.appender.file.ImmediateFlush=true
- log4j.appender.file.Append=true
- log4j.appender.file.layout=org.apache.log4j.PatternLayout
- log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
- log4j.appender.console=org.apache.log4j.ConsoleAppender
- log4j.appender.console.Threshold=DEBUG
- log4j.appender.console.layout=org.apache.log4j.PatternLayout
- log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
++## Logger configure file for myproject
++log.dir=logs/
++datestamp=yyyy-MM-dd/HH:mm:ss.SSS
++
++log4j.rootLogger=DEBUG, file, console
++
++log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
++log4j.appender.file.threshold=DEBUG
++log4j.appender.file.File=${log.dir}/log4j.log
++log4j.appender.file.DatePattern=-yyyyMMddHH
++log4j.appender.file.ImmediateFlush=true
++log4j.appender.file.Append=true
++log4j.appender.file.layout=org.apache.log4j.PatternLayout
++log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
++log4j.appender.console=org.apache.log4j.ConsoleAppender
++log4j.appender.console.Threshold=DEBUG
++log4j.appender.console.layout=org.apache.log4j.PatternLayout
++log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
diff --cc generic/java-server/2.6/src/main/java/org/apache/dubbo/Gender.java
index 7b503cc,0000000..a016781
mode 100644,000000..100644
--- a/generic/java-server/2.6/src/main/java/org/apache/dubbo/Gender.java
+++ b/generic/java-server/2.6/src/main/java/org/apache/dubbo/Gender.java
@@@ -1,23 -1,0 +1,23 @@@
- /*
- * 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;
-
- public enum Gender {
- MAN,
- WOMAN
- }
++/*
++ * 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;
++
++public enum Gender {
++ MAN,
++ WOMAN
++}
diff --cc generic/java-server/2.6/src/main/java/org/apache/dubbo/User.java
index 7fcfa38,0000000..039a883
mode 100644,000000..100644
--- a/generic/java-server/2.6/src/main/java/org/apache/dubbo/User.java
+++ b/generic/java-server/2.6/src/main/java/org/apache/dubbo/User.java
@@@ -1,95 -1,0 +1,95 @@@
- /*
- * 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;
-
- import java.io.Serializable;
- import java.util.Date;
-
- public class User implements Serializable {
-
- private String id;
-
- private String name;
-
- private int age;
-
- private Date time = new Date();
-
- private Gender sex = Gender.MAN;
-
- public User() {
- }
-
- public User(String id, String name, int age) {
- this.id = id;
- this.name = name;
- this.age = age;
- }
-
- public User(String id, String name, int age, Date time, Gender sex) {
- this.id = id;
- this.name = name;
- this.age = age;
- this.time = time;
- this.sex = sex;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- 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 Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
- public Gender getSex() {
- return sex;
- }
-
- public void setSex(Gender sex) {
- this.sex = sex;
- }
-
- public String toString() {
- return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time + ", gender:" + sex + "}";
- }
- }
++/*
++ * 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;
++
++import java.io.Serializable;
++import java.util.Date;
++
++public class User implements Serializable {
++
++ private String id;
++
++ private String name;
++
++ private int age;
++
++ private Date time = new Date();
++
++ private Gender sex = Gender.MAN;
++
++ public User() {
++ }
++
++ public User(String id, String name, int age) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ }
++
++ public User(String id, String name, int age, Date time, Gender sex) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ this.time = time;
++ this.sex = sex;
++ }
++
++ public String getId() {
++ return id;
++ }
++
++ public void setId(String id) {
++ this.id = id;
++ }
++
++ 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 Date getTime() {
++ return time;
++ }
++
++ public void setTime(Date time) {
++ this.time = time;
++ }
++
++ public Gender getSex() {
++ return sex;
++ }
++
++ public void setSex(Gender sex) {
++ this.sex = sex;
++ }
++
++ public String toString() {
++ return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time + ", gender:" + sex + "}";
++ }
++}
diff --cc generic/java-server/2.6/src/main/java/org/apache/dubbo/UserProvider.java
index 1c13f05,0000000..5cd6ffe
mode 100644,000000..100644
--- a/generic/java-server/2.6/src/main/java/org/apache/dubbo/UserProvider.java
+++ b/generic/java-server/2.6/src/main/java/org/apache/dubbo/UserProvider.java
@@@ -1,50 -1,0 +1,50 @@@
- /*
- * 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;
-
- import java.util.List;
- import java.util.Map;
-
- public interface UserProvider {
-
- boolean isLimit(Gender gender, String name);
-
- User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
-
- List<User> GetUsers(List<String> userIdList);
-
- void GetUser3();
-
- User GetUser0(String userId, String name);
-
- User GetErr(String userId) throws Exception;
-
- Map<String, User> GetUserMap(List<String> userIdList);
-
- User getUser(int usercode);
-
- User getUser(int usercode, String name);
-
- User queryUser(User user);
-
- Map<String, User> queryAll();
-
- int Calc(int a, int b);
-
- Response<Integer> Sum(int a, int b);
- }
++/*
++ * 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;
++
++import java.util.List;
++import java.util.Map;
++
++public interface UserProvider {
++
++ boolean isLimit(Gender gender, String name);
++
++ User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
++
++ List<User> GetUsers(List<String> userIdList);
++
++ void GetUser3();
++
++ User GetUser0(String userId, String name);
++
++ User GetErr(String userId) throws Exception;
++
++ Map<String, User> GetUserMap(List<String> userIdList);
++
++ User getUser(int usercode);
++
++ User getUser(int usercode, String name);
++
++ User queryUser(User user);
++
++ Map<String, User> queryAll();
++
++ int Calc(int a, int b);
++
++ Response<Integer> Sum(int a, int b);
++}
diff --cc generic/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
index cc6170e,0000000..3e2f9f2
mode 100644,000000..100644
--- a/generic/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
+++ b/generic/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
@@@ -1,143 -1,0 +1,143 @@@
- /*
- * 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;
-
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-
- import java.util.*;
-
- public class UserProviderAnotherImpl implements UserProvider {
- // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
- private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to com.dubbogo.user-server.log
-
- private Map<String, User> userMap = new HashMap<String, User>();
-
- public UserProviderAnotherImpl() {
- // userMap.put("001", new User("001", "other-zhangsan", 18, new Date(1998-1900, 1, 2, 3, 4, 5), Gender.MAN));
- userMap.put("001", new User("001", "other-zhangsan", 18, new Date(0x12345678), Gender.MAN));
- userMap.put("002", new User("002", "other-lisi", 20, new Date(1996-1900, 1, 2, 3, 4, 5), Gender.MAN));
- userMap.put("003", new User("003", "other-lily", 23, new Date(1993-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
- userMap.put("004", new User("004", "other-lisa", 32, new Date(1985-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
- }
-
- public boolean isLimit(Gender gender, String name) {
- logger.info(String.format("input gender=%sand name=%s", gender, name));
- return Gender.MAN == gender;
- }
-
- public User GetUser(String userId) {
- logger.info("input userId = " + userId);
- return new User(userId, "Joe", 48);
- }
-
- public User GetUser0(String userId, String name) {
- return new User(userId, name, 48);
- }
-
- public void GetUser3() {
- logger.info("this is GetUser3 of another");
- }
-
- public User GetErr(String userId) throws Exception {
- throw new Exception("exception");
- }
-
- public List<User> GetUsers(ArrayList<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- public Map<String, User> GetUserMap(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- Map<String, User> map = new HashMap<String, User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- map.put(id, userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return map;
- }
-
- public List<User> GetUsers(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- // @Override
- public User getUser(int userCode) {
- logger.info("input userCode = " + userCode);
- return new User(String.valueOf(userCode), "userCode get", 48);
- }
-
- public User getUser(int usercode, String name) {
- return new User(String.valueOf(usercode), name, 18);
- }
-
- public User queryUser(User user) {
- logger.info("input com.dubbogo.user = " + user);
- return new User(user.getId(), "get:" + user.getName(), user.getAge() + 18);
- }
-
- public Map<String, User> queryAll() {
- logger.info("input");
- Map<String, User> map = new HashMap<String, User>();
- map.put("001", new User("001", "Joe", 18));
- map.put("002", new User("002", "Wen", 20));
-
- return map;
- }
-
- public int Calc(int a,int b) {
- return a + b + 100;
- }
-
- public Response<Integer> Sum(int a,int b) {
- return Response.ok(a+b);
- }
- }
++/*
++ * 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;
++
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++import java.util.*;
++
++public class UserProviderAnotherImpl implements UserProvider {
++ // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
++ private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to com.dubbogo.user-server.log
++
++ private Map<String, User> userMap = new HashMap<String, User>();
++
++ public UserProviderAnotherImpl() {
++ // userMap.put("001", new User("001", "other-zhangsan", 18, new Date(1998-1900, 1, 2, 3, 4, 5), Gender.MAN));
++ userMap.put("001", new User("001", "other-zhangsan", 18, new Date(0x12345678), Gender.MAN));
++ userMap.put("002", new User("002", "other-lisi", 20, new Date(1996-1900, 1, 2, 3, 4, 5), Gender.MAN));
++ userMap.put("003", new User("003", "other-lily", 23, new Date(1993-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
++ userMap.put("004", new User("004", "other-lisa", 32, new Date(1985-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
++ }
++
++ public boolean isLimit(Gender gender, String name) {
++ logger.info(String.format("input gender=%sand name=%s", gender, name));
++ return Gender.MAN == gender;
++ }
++
++ public User GetUser(String userId) {
++ logger.info("input userId = " + userId);
++ return new User(userId, "Joe", 48);
++ }
++
++ public User GetUser0(String userId, String name) {
++ return new User(userId, name, 48);
++ }
++
++ public void GetUser3() {
++ logger.info("this is GetUser3 of another");
++ }
++
++ public User GetErr(String userId) throws Exception {
++ throw new Exception("exception");
++ }
++
++ public List<User> GetUsers(ArrayList<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ public Map<String, User> GetUserMap(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ Map<String, User> map = new HashMap<String, User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ map.put(id, userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return map;
++ }
++
++ public List<User> GetUsers(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ // @Override
++ public User getUser(int userCode) {
++ logger.info("input userCode = " + userCode);
++ return new User(String.valueOf(userCode), "userCode get", 48);
++ }
++
++ public User getUser(int usercode, String name) {
++ return new User(String.valueOf(usercode), name, 18);
++ }
++
++ public User queryUser(User user) {
++ logger.info("input com.dubbogo.user = " + user);
++ return new User(user.getId(), "get:" + user.getName(), user.getAge() + 18);
++ }
++
++ public Map<String, User> queryAll() {
++ logger.info("input");
++ Map<String, User> map = new HashMap<String, User>();
++ map.put("001", new User("001", "Joe", 18));
++ map.put("002", new User("002", "Wen", 20));
++
++ return map;
++ }
++
++ public int Calc(int a,int b) {
++ return a + b + 100;
++ }
++
++ public Response<Integer> Sum(int a,int b) {
++ return Response.ok(a+b);
++ }
++}
diff --cc generic/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderImpl.java
index bdb9651,0000000..1a4bb59
mode 100644,000000..100644
--- a/generic/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderImpl.java
+++ b/generic/java-server/2.6/src/main/java/org/apache/dubbo/UserProviderImpl.java
@@@ -1,115 -1,0 +1,115 @@@
- /*
- * 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;
-
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-
- import java.util.*;
-
- public class UserProviderImpl implements UserProvider {
- // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
- private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to com.dubbogo.user-server.log
- Map<String, User> userMap = new HashMap<String, User>();
-
- public UserProviderImpl() {
- userMap.put("A001", new User("A001", "demo-zhangsan", 18));
- userMap.put("A002", new User("A002", "demo-lisi", 20));
- userMap.put("A003", new User("A003", "demo-lily", 23));
- userMap.put("A004", new User("A004", "demo-lisa", 32));
- }
-
- public boolean isLimit(Gender gender, String name) {
- return Gender.WOMAN == gender;
- }
-
- public User GetUser(String userId) {
- return new User(userId, "zhangsan", 18);
- }
-
- public User GetErr(String userId) throws Exception {
- throw new Exception("exception");
- }
-
- public User GetUser0(String userId, String name) {
- return new User(userId, name, 18);
- }
-
- public List<User> GetUsers(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- LOG.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- LOG.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- public void GetUser3() {
- LOG.info("this is GetUser3 of impl");
- }
-
- public Map<String, User> GetUserMap(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- Map<String, User> map = new HashMap<String, User>();
- LOG.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- LOG.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- map.put(id, userMap.get(id));
- LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return map;
- }
-
- public User queryUser(User user) {
- return new User(user.getId(), "hello:" +user.getName(), user.getAge() + 18);
- }
-
- public Map<String, User> queryAll() {
- return userMap;
- }
-
-
- public User getUser(int userCode) {
- return new User(String.valueOf(userCode), "userCode get", 48);
- }
-
- public User getUser(int usercode, String name) {
- return new User(String.valueOf(usercode), name, 38);
- }
-
- public int Calc(int a,int b) {
- return a + b;
- }
-
- public Response<Integer> Sum(int a,int b) {
- return Response.ok(a+b);
- }
- }
++/*
++ * 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;
++
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++import java.util.*;
++
++public class UserProviderImpl implements UserProvider {
++ // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
++ private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to com.dubbogo.user-server.log
++ Map<String, User> userMap = new HashMap<String, User>();
++
++ public UserProviderImpl() {
++ userMap.put("A001", new User("A001", "demo-zhangsan", 18));
++ userMap.put("A002", new User("A002", "demo-lisi", 20));
++ userMap.put("A003", new User("A003", "demo-lily", 23));
++ userMap.put("A004", new User("A004", "demo-lisa", 32));
++ }
++
++ public boolean isLimit(Gender gender, String name) {
++ return Gender.WOMAN == gender;
++ }
++
++ public User GetUser(String userId) {
++ return new User(userId, "zhangsan", 18);
++ }
++
++ public User GetErr(String userId) throws Exception {
++ throw new Exception("exception");
++ }
++
++ public User GetUser0(String userId, String name) {
++ return new User(userId, name, 18);
++ }
++
++ public List<User> GetUsers(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ LOG.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ LOG.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ public void GetUser3() {
++ LOG.info("this is GetUser3 of impl");
++ }
++
++ public Map<String, User> GetUserMap(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ Map<String, User> map = new HashMap<String, User>();
++ LOG.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ LOG.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ map.put(id, userMap.get(id));
++ LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return map;
++ }
++
++ public User queryUser(User user) {
++ return new User(user.getId(), "hello:" +user.getName(), user.getAge() + 18);
++ }
++
++ public Map<String, User> queryAll() {
++ return userMap;
++ }
++
++
++ public User getUser(int userCode) {
++ return new User(String.valueOf(userCode), "userCode get", 48);
++ }
++
++ public User getUser(int usercode, String name) {
++ return new User(String.valueOf(usercode), name, 38);
++ }
++
++ public int Calc(int a,int b) {
++ return a + b;
++ }
++
++ public Response<Integer> Sum(int a,int b) {
++ return Response.ok(a+b);
++ }
++}
diff --cc generic/java-server/2.6/src/main/resources/META-INF/spring/dubbo.provider.xml
index cd63653,0000000..efad8af
mode 100644,000000..100644
--- a/generic/java-server/2.6/src/main/resources/META-INF/spring/dubbo.provider.xml
+++ b/generic/java-server/2.6/src/main/resources/META-INF/spring/dubbo.provider.xml
@@@ -1,36 -1,0 +1,36 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
-
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
-
- <!-- 应用名 -->
- <dubbo:application name="user-info-server"/>
- <!-- 连接到哪个本地注册中心 -->
- <dubbo:registry id="dubbogo" address="zookeeper://127.0.0.1:2181" />
- <!-- 用dubbo协议在20880端口暴露服务 -->
- <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
- <!-- 声明需要暴露的服务接口 -->
- <dubbo:service id="aaa" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="demoService"/>
- <dubbo:service id="bbb" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" version="2.0"/>
- <dubbo:service id="ccc" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" group="as" version="2.0"/>
-
- <bean id="demoService" class="org.apache.dubbo.UserProviderImpl" />
- <bean id="otherService" class="org.apache.dubbo.UserProviderAnotherImpl"/>
-
- </beans>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++
++<beans xmlns="http://www.springframework.org/schema/beans"
++ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
++ xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
++ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
++ http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
++
++ <!-- 应用名 -->
++ <dubbo:application name="user-info-server"/>
++ <!-- 连接到哪个本地注册中心 -->
++ <dubbo:registry id="dubbogo" address="zookeeper://127.0.0.1:2181" />
++ <!-- 用dubbo协议在20880端口暴露服务 -->
++ <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
++ <!-- 声明需要暴露的服务接口 -->
++ <dubbo:service id="aaa" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="demoService"/>
++ <dubbo:service id="bbb" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" version="2.0"/>
++ <dubbo:service id="ccc" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" group="as" version="2.0"/>
++
++ <bean id="demoService" class="org.apache.dubbo.UserProviderImpl" />
++ <bean id="otherService" class="org.apache.dubbo.UserProviderAnotherImpl"/>
++
++</beans>
diff --cc generic/java-server/2.6/src/main/resources/log4j.properties
index 13c8049,0000000..806e33d
mode 100644,000000..100644
--- a/generic/java-server/2.6/src/main/resources/log4j.properties
+++ b/generic/java-server/2.6/src/main/resources/log4j.properties
@@@ -1,20 -1,0 +1,20 @@@
- ## Logger configure file for myproject
- log.dir=logs/
- datestamp=yyyy-MM-dd/HH:mm:ss.SSS
-
- log4j.rootLogger=DEBUG, file, console
-
- log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.file.threshold=DEBUG
- log4j.appender.file.File=${log.dir}/log4j.log
- log4j.appender.file.DatePattern=-yyyyMMddHH
- log4j.appender.file.ImmediateFlush=true
- log4j.appender.file.Append=true
- log4j.appender.file.layout=org.apache.log4j.PatternLayout
- log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
- log4j.appender.console=org.apache.log4j.ConsoleAppender
- log4j.appender.console.Threshold=DEBUG
- log4j.appender.console.layout=org.apache.log4j.PatternLayout
- log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
++## Logger configure file for myproject
++log.dir=logs/
++datestamp=yyyy-MM-dd/HH:mm:ss.SSS
++
++log4j.rootLogger=DEBUG, file, console
++
++log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
++log4j.appender.file.threshold=DEBUG
++log4j.appender.file.File=${log.dir}/log4j.log
++log4j.appender.file.DatePattern=-yyyyMMddHH
++log4j.appender.file.ImmediateFlush=true
++log4j.appender.file.Append=true
++log4j.appender.file.layout=org.apache.log4j.PatternLayout
++log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
++log4j.appender.console=org.apache.log4j.ConsoleAppender
++log4j.appender.console.Threshold=DEBUG
++log4j.appender.console.layout=org.apache.log4j.PatternLayout
++log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
diff --cc generic/java-server/2.7/src/main/java/org/apache/dubbo/Gender.java
index 7b503cc,0000000..a016781
mode 100644,000000..100644
--- a/generic/java-server/2.7/src/main/java/org/apache/dubbo/Gender.java
+++ b/generic/java-server/2.7/src/main/java/org/apache/dubbo/Gender.java
@@@ -1,23 -1,0 +1,23 @@@
- /*
- * 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;
-
- public enum Gender {
- MAN,
- WOMAN
- }
++/*
++ * 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;
++
++public enum Gender {
++ MAN,
++ WOMAN
++}
diff --cc generic/java-server/2.7/src/main/java/org/apache/dubbo/User.java
index 7fcfa38,0000000..039a883
mode 100644,000000..100644
--- a/generic/java-server/2.7/src/main/java/org/apache/dubbo/User.java
+++ b/generic/java-server/2.7/src/main/java/org/apache/dubbo/User.java
@@@ -1,95 -1,0 +1,95 @@@
- /*
- * 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;
-
- import java.io.Serializable;
- import java.util.Date;
-
- public class User implements Serializable {
-
- private String id;
-
- private String name;
-
- private int age;
-
- private Date time = new Date();
-
- private Gender sex = Gender.MAN;
-
- public User() {
- }
-
- public User(String id, String name, int age) {
- this.id = id;
- this.name = name;
- this.age = age;
- }
-
- public User(String id, String name, int age, Date time, Gender sex) {
- this.id = id;
- this.name = name;
- this.age = age;
- this.time = time;
- this.sex = sex;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- 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 Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
- public Gender getSex() {
- return sex;
- }
-
- public void setSex(Gender sex) {
- this.sex = sex;
- }
-
- public String toString() {
- return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time + ", gender:" + sex + "}";
- }
- }
++/*
++ * 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;
++
++import java.io.Serializable;
++import java.util.Date;
++
++public class User implements Serializable {
++
++ private String id;
++
++ private String name;
++
++ private int age;
++
++ private Date time = new Date();
++
++ private Gender sex = Gender.MAN;
++
++ public User() {
++ }
++
++ public User(String id, String name, int age) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ }
++
++ public User(String id, String name, int age, Date time, Gender sex) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ this.time = time;
++ this.sex = sex;
++ }
++
++ public String getId() {
++ return id;
++ }
++
++ public void setId(String id) {
++ this.id = id;
++ }
++
++ 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 Date getTime() {
++ return time;
++ }
++
++ public void setTime(Date time) {
++ this.time = time;
++ }
++
++ public Gender getSex() {
++ return sex;
++ }
++
++ public void setSex(Gender sex) {
++ this.sex = sex;
++ }
++
++ public String toString() {
++ return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time + ", gender:" + sex + "}";
++ }
++}
diff --cc generic/java-server/2.7/src/main/java/org/apache/dubbo/UserProvider.java
index 1c13f05,0000000..5cd6ffe
mode 100644,000000..100644
--- a/generic/java-server/2.7/src/main/java/org/apache/dubbo/UserProvider.java
+++ b/generic/java-server/2.7/src/main/java/org/apache/dubbo/UserProvider.java
@@@ -1,50 -1,0 +1,50 @@@
- /*
- * 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;
-
- import java.util.List;
- import java.util.Map;
-
- public interface UserProvider {
-
- boolean isLimit(Gender gender, String name);
-
- User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
-
- List<User> GetUsers(List<String> userIdList);
-
- void GetUser3();
-
- User GetUser0(String userId, String name);
-
- User GetErr(String userId) throws Exception;
-
- Map<String, User> GetUserMap(List<String> userIdList);
-
- User getUser(int usercode);
-
- User getUser(int usercode, String name);
-
- User queryUser(User user);
-
- Map<String, User> queryAll();
-
- int Calc(int a, int b);
-
- Response<Integer> Sum(int a, int b);
- }
++/*
++ * 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;
++
++import java.util.List;
++import java.util.Map;
++
++public interface UserProvider {
++
++ boolean isLimit(Gender gender, String name);
++
++ User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
++
++ List<User> GetUsers(List<String> userIdList);
++
++ void GetUser3();
++
++ User GetUser0(String userId, String name);
++
++ User GetErr(String userId) throws Exception;
++
++ Map<String, User> GetUserMap(List<String> userIdList);
++
++ User getUser(int usercode);
++
++ User getUser(int usercode, String name);
++
++ User queryUser(User user);
++
++ Map<String, User> queryAll();
++
++ int Calc(int a, int b);
++
++ Response<Integer> Sum(int a, int b);
++}
diff --cc generic/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
index cc6170e,0000000..3e2f9f2
mode 100644,000000..100644
--- a/generic/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
+++ b/generic/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderAnotherImpl.java
@@@ -1,143 -1,0 +1,143 @@@
- /*
- * 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;
-
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-
- import java.util.*;
-
- public class UserProviderAnotherImpl implements UserProvider {
- // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
- private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to com.dubbogo.user-server.log
-
- private Map<String, User> userMap = new HashMap<String, User>();
-
- public UserProviderAnotherImpl() {
- // userMap.put("001", new User("001", "other-zhangsan", 18, new Date(1998-1900, 1, 2, 3, 4, 5), Gender.MAN));
- userMap.put("001", new User("001", "other-zhangsan", 18, new Date(0x12345678), Gender.MAN));
- userMap.put("002", new User("002", "other-lisi", 20, new Date(1996-1900, 1, 2, 3, 4, 5), Gender.MAN));
- userMap.put("003", new User("003", "other-lily", 23, new Date(1993-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
- userMap.put("004", new User("004", "other-lisa", 32, new Date(1985-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
- }
-
- public boolean isLimit(Gender gender, String name) {
- logger.info(String.format("input gender=%sand name=%s", gender, name));
- return Gender.MAN == gender;
- }
-
- public User GetUser(String userId) {
- logger.info("input userId = " + userId);
- return new User(userId, "Joe", 48);
- }
-
- public User GetUser0(String userId, String name) {
- return new User(userId, name, 48);
- }
-
- public void GetUser3() {
- logger.info("this is GetUser3 of another");
- }
-
- public User GetErr(String userId) throws Exception {
- throw new Exception("exception");
- }
-
- public List<User> GetUsers(ArrayList<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- public Map<String, User> GetUserMap(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- Map<String, User> map = new HashMap<String, User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- map.put(id, userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return map;
- }
-
- public List<User> GetUsers(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- logger.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- logger.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- // @Override
- public User getUser(int userCode) {
- logger.info("input userCode = " + userCode);
- return new User(String.valueOf(userCode), "userCode get", 48);
- }
-
- public User getUser(int usercode, String name) {
- return new User(String.valueOf(usercode), name, 18);
- }
-
- public User queryUser(User user) {
- logger.info("input com.dubbogo.user = " + user);
- return new User(user.getId(), "get:" + user.getName(), user.getAge() + 18);
- }
-
- public Map<String, User> queryAll() {
- logger.info("input");
- Map<String, User> map = new HashMap<String, User>();
- map.put("001", new User("001", "Joe", 18));
- map.put("002", new User("002", "Wen", 20));
-
- return map;
- }
-
- public int Calc(int a,int b) {
- return a + b + 100;
- }
-
- public Response<Integer> Sum(int a,int b) {
- return Response.ok(a+b);
- }
- }
++/*
++ * 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;
++
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++import java.util.*;
++
++public class UserProviderAnotherImpl implements UserProvider {
++ // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
++ private static final Logger logger = LoggerFactory.getLogger("userLogger"); // Output to com.dubbogo.user-server.log
++
++ private Map<String, User> userMap = new HashMap<String, User>();
++
++ public UserProviderAnotherImpl() {
++ // userMap.put("001", new User("001", "other-zhangsan", 18, new Date(1998-1900, 1, 2, 3, 4, 5), Gender.MAN));
++ userMap.put("001", new User("001", "other-zhangsan", 18, new Date(0x12345678), Gender.MAN));
++ userMap.put("002", new User("002", "other-lisi", 20, new Date(1996-1900, 1, 2, 3, 4, 5), Gender.MAN));
++ userMap.put("003", new User("003", "other-lily", 23, new Date(1993-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
++ userMap.put("004", new User("004", "other-lisa", 32, new Date(1985-1900, 1, 2, 3, 4, 5), Gender.WOMAN));
++ }
++
++ public boolean isLimit(Gender gender, String name) {
++ logger.info(String.format("input gender=%sand name=%s", gender, name));
++ return Gender.MAN == gender;
++ }
++
++ public User GetUser(String userId) {
++ logger.info("input userId = " + userId);
++ return new User(userId, "Joe", 48);
++ }
++
++ public User GetUser0(String userId, String name) {
++ return new User(userId, name, 48);
++ }
++
++ public void GetUser3() {
++ logger.info("this is GetUser3 of another");
++ }
++
++ public User GetErr(String userId) throws Exception {
++ throw new Exception("exception");
++ }
++
++ public List<User> GetUsers(ArrayList<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ public Map<String, User> GetUserMap(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ Map<String, User> map = new HashMap<String, User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ map.put(id, userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return map;
++ }
++
++ public List<User> GetUsers(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ logger.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ logger.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ logger.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ // @Override
++ public User getUser(int userCode) {
++ logger.info("input userCode = " + userCode);
++ return new User(String.valueOf(userCode), "userCode get", 48);
++ }
++
++ public User getUser(int usercode, String name) {
++ return new User(String.valueOf(usercode), name, 18);
++ }
++
++ public User queryUser(User user) {
++ logger.info("input com.dubbogo.user = " + user);
++ return new User(user.getId(), "get:" + user.getName(), user.getAge() + 18);
++ }
++
++ public Map<String, User> queryAll() {
++ logger.info("input");
++ Map<String, User> map = new HashMap<String, User>();
++ map.put("001", new User("001", "Joe", 18));
++ map.put("002", new User("002", "Wen", 20));
++
++ return map;
++ }
++
++ public int Calc(int a,int b) {
++ return a + b + 100;
++ }
++
++ public Response<Integer> Sum(int a,int b) {
++ return Response.ok(a+b);
++ }
++}
diff --cc generic/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderImpl.java
index bdb9651,0000000..1a4bb59
mode 100644,000000..100644
--- a/generic/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderImpl.java
+++ b/generic/java-server/2.7/src/main/java/org/apache/dubbo/UserProviderImpl.java
@@@ -1,115 -1,0 +1,115 @@@
- /*
- * 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;
-
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-
- import java.util.*;
-
- public class UserProviderImpl implements UserProvider {
- // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
- private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to com.dubbogo.user-server.log
- Map<String, User> userMap = new HashMap<String, User>();
-
- public UserProviderImpl() {
- userMap.put("A001", new User("A001", "demo-zhangsan", 18));
- userMap.put("A002", new User("A002", "demo-lisi", 20));
- userMap.put("A003", new User("A003", "demo-lily", 23));
- userMap.put("A004", new User("A004", "demo-lisa", 32));
- }
-
- public boolean isLimit(Gender gender, String name) {
- return Gender.WOMAN == gender;
- }
-
- public User GetUser(String userId) {
- return new User(userId, "zhangsan", 18);
- }
-
- public User GetErr(String userId) throws Exception {
- throw new Exception("exception");
- }
-
- public User GetUser0(String userId, String name) {
- return new User(userId, name, 18);
- }
-
- public List<User> GetUsers(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- List<User> userList = new ArrayList<User>();
- LOG.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- LOG.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- userList.add(userMap.get(id));
- LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return userList;
- }
-
- public void GetUser3() {
- LOG.info("this is GetUser3 of impl");
- }
-
- public Map<String, User> GetUserMap(List<String> userIdList) {
- Iterator it = userIdList.iterator();
- Map<String, User> map = new HashMap<String, User>();
- LOG.warn("@userIdList size:" + userIdList.size());
-
- while(it.hasNext()) {
- String id = (String)(it.next());
- LOG.info("GetUsers(@uid:" + id + ")");
- if (userMap.containsKey(id)) {
- map.put(id, userMap.get(id));
- LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
- }
- }
-
- return map;
- }
-
- public User queryUser(User user) {
- return new User(user.getId(), "hello:" +user.getName(), user.getAge() + 18);
- }
-
- public Map<String, User> queryAll() {
- return userMap;
- }
-
-
- public User getUser(int userCode) {
- return new User(String.valueOf(userCode), "userCode get", 48);
- }
-
- public User getUser(int usercode, String name) {
- return new User(String.valueOf(usercode), name, 38);
- }
-
- public int Calc(int a,int b) {
- return a + b;
- }
-
- public Response<Integer> Sum(int a,int b) {
- return Response.ok(a+b);
- }
- }
++/*
++ * 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;
++
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++import java.util.*;
++
++public class UserProviderImpl implements UserProvider {
++ // private static final Logger logger = LoggerFactory.getLogger(getClass()); // Only output to dubbo's log(logs/server.log)
++ private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); // Output to com.dubbogo.user-server.log
++ Map<String, User> userMap = new HashMap<String, User>();
++
++ public UserProviderImpl() {
++ userMap.put("A001", new User("A001", "demo-zhangsan", 18));
++ userMap.put("A002", new User("A002", "demo-lisi", 20));
++ userMap.put("A003", new User("A003", "demo-lily", 23));
++ userMap.put("A004", new User("A004", "demo-lisa", 32));
++ }
++
++ public boolean isLimit(Gender gender, String name) {
++ return Gender.WOMAN == gender;
++ }
++
++ public User GetUser(String userId) {
++ return new User(userId, "zhangsan", 18);
++ }
++
++ public User GetErr(String userId) throws Exception {
++ throw new Exception("exception");
++ }
++
++ public User GetUser0(String userId, String name) {
++ return new User(userId, name, 18);
++ }
++
++ public List<User> GetUsers(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ List<User> userList = new ArrayList<User>();
++ LOG.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ LOG.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ userList.add(userMap.get(id));
++ LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return userList;
++ }
++
++ public void GetUser3() {
++ LOG.info("this is GetUser3 of impl");
++ }
++
++ public Map<String, User> GetUserMap(List<String> userIdList) {
++ Iterator it = userIdList.iterator();
++ Map<String, User> map = new HashMap<String, User>();
++ LOG.warn("@userIdList size:" + userIdList.size());
++
++ while(it.hasNext()) {
++ String id = (String)(it.next());
++ LOG.info("GetUsers(@uid:" + id + ")");
++ if (userMap.containsKey(id)) {
++ map.put(id, userMap.get(id));
++ LOG.info("id:" + id + ", com.dubbogo.user:" + userMap.get(id));
++ }
++ }
++
++ return map;
++ }
++
++ public User queryUser(User user) {
++ return new User(user.getId(), "hello:" +user.getName(), user.getAge() + 18);
++ }
++
++ public Map<String, User> queryAll() {
++ return userMap;
++ }
++
++
++ public User getUser(int userCode) {
++ return new User(String.valueOf(userCode), "userCode get", 48);
++ }
++
++ public User getUser(int usercode, String name) {
++ return new User(String.valueOf(usercode), name, 38);
++ }
++
++ public int Calc(int a,int b) {
++ return a + b;
++ }
++
++ public Response<Integer> Sum(int a,int b) {
++ return Response.ok(a+b);
++ }
++}
diff --cc generic/java-server/2.7/src/main/resources/META-INF/spring/dubbo.provider.xml
index cd63653,0000000..efad8af
mode 100644,000000..100644
--- a/generic/java-server/2.7/src/main/resources/META-INF/spring/dubbo.provider.xml
+++ b/generic/java-server/2.7/src/main/resources/META-INF/spring/dubbo.provider.xml
@@@ -1,36 -1,0 +1,36 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
-
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
-
- <!-- 应用名 -->
- <dubbo:application name="user-info-server"/>
- <!-- 连接到哪个本地注册中心 -->
- <dubbo:registry id="dubbogo" address="zookeeper://127.0.0.1:2181" />
- <!-- 用dubbo协议在20880端口暴露服务 -->
- <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
- <!-- 声明需要暴露的服务接口 -->
- <dubbo:service id="aaa" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="demoService"/>
- <dubbo:service id="bbb" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" version="2.0"/>
- <dubbo:service id="ccc" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" group="as" version="2.0"/>
-
- <bean id="demoService" class="org.apache.dubbo.UserProviderImpl" />
- <bean id="otherService" class="org.apache.dubbo.UserProviderAnotherImpl"/>
-
- </beans>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++
++<beans xmlns="http://www.springframework.org/schema/beans"
++ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
++ xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
++ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
++ http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
++
++ <!-- 应用名 -->
++ <dubbo:application name="user-info-server"/>
++ <!-- 连接到哪个本地注册中心 -->
++ <dubbo:registry id="dubbogo" address="zookeeper://127.0.0.1:2181" />
++ <!-- 用dubbo协议在20880端口暴露服务 -->
++ <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
++ <!-- 声明需要暴露的服务接口 -->
++ <dubbo:service id="aaa" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="demoService"/>
++ <dubbo:service id="bbb" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" version="2.0"/>
++ <dubbo:service id="ccc" registry="dubbogo" timeout="3000" interface="org.apache.dubbo.UserProvider" ref="otherService" group="as" version="2.0"/>
++
++ <bean id="demoService" class="org.apache.dubbo.UserProviderImpl" />
++ <bean id="otherService" class="org.apache.dubbo.UserProviderAnotherImpl"/>
++
++</beans>
diff --cc generic/java-server/2.7/src/main/resources/log4j.properties
index 13c8049,0000000..806e33d
mode 100644,000000..100644
--- a/generic/java-server/2.7/src/main/resources/log4j.properties
+++ b/generic/java-server/2.7/src/main/resources/log4j.properties
@@@ -1,20 -1,0 +1,20 @@@
- ## Logger configure file for myproject
- log.dir=logs/
- datestamp=yyyy-MM-dd/HH:mm:ss.SSS
-
- log4j.rootLogger=DEBUG, file, console
-
- log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.file.threshold=DEBUG
- log4j.appender.file.File=${log.dir}/log4j.log
- log4j.appender.file.DatePattern=-yyyyMMddHH
- log4j.appender.file.ImmediateFlush=true
- log4j.appender.file.Append=true
- log4j.appender.file.layout=org.apache.log4j.PatternLayout
- log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
- log4j.appender.console=org.apache.log4j.ConsoleAppender
- log4j.appender.console.Threshold=DEBUG
- log4j.appender.console.layout=org.apache.log4j.PatternLayout
- log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
++## Logger configure file for myproject
++log.dir=logs/
++datestamp=yyyy-MM-dd/HH:mm:ss.SSS
++
++log4j.rootLogger=DEBUG, file, console
++
++log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
++log4j.appender.file.threshold=DEBUG
++log4j.appender.file.File=${log.dir}/log4j.log
++log4j.appender.file.DatePattern=-yyyyMMddHH
++log4j.appender.file.ImmediateFlush=true
++log4j.appender.file.Append=true
++log4j.appender.file.layout=org.apache.log4j.PatternLayout
++log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
++log4j.appender.console=org.apache.log4j.ConsoleAppender
++log4j.appender.console.Threshold=DEBUG
++log4j.appender.console.layout=org.apache.log4j.PatternLayout
++log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
diff --cc go.mod
index 3885d92,0000000..6d28f3d
mode 100644,000000..100644
--- a/go.mod
+++ b/go.mod
@@@ -1,40 -1,0 +1,41 @@@
+module github.com/apache/dubbo-go-samples
+
+require (
+ cloud.google.com/go v0.50.0 // indirect
+ github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 // indirect
+ github.com/alibaba/sentinel-golang v1.0.2
+ github.com/apache/dubbo-getty v1.4.3
+ github.com/apache/dubbo-go v1.5.6
+ github.com/apache/dubbo-go-hessian2 v1.9.1
+ github.com/bwmarrin/snowflake v0.3.0
+ github.com/docker/go-connections v0.4.0 // indirect
+ github.com/dubbogo/gost v1.11.2
+ github.com/emicklei/go-restful/v3 v3.4.0
+ github.com/golang/protobuf v1.4.3
+ github.com/gophercloud/gophercloud v0.3.0 // indirect
+ github.com/hashicorp/golang-lru v0.5.3 // indirect
+ github.com/imdario/mergo v0.3.9 // indirect
+ github.com/linode/linodego v0.10.0 // indirect
+ github.com/miekg/dns v1.1.27 // indirect
+ github.com/mitchellh/hashstructure v1.0.0 // indirect
+ github.com/opentracing/opentracing-go v1.2.0
+ github.com/opentrx/mysql v1.0.0-pre // indirect
+ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5
+ github.com/openzipkin/zipkin-go v0.2.2
+ github.com/pkg/errors v0.9.1
+ github.com/prometheus/client_golang v1.9.0
+ github.com/stretchr/testify v1.7.0
+ github.com/transaction-wg/seata-golang v0.2.1-alpha
+ github.com/uber/jaeger-client-go v2.22.1+incompatible
+ github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
+ google.golang.org/grpc v1.33.1
+ google.golang.org/grpc/examples v0.0.0-20210322221411-d26af8e39165 // indirect
+)
+
+replace (
++ github.com/apache/dubbo-go => github.com/apache/dubbo-go v1.5.7-rc1
+ github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.8.0
+ google.golang.org/grpc => google.golang.org/grpc v1.26.0
+)
+
+go 1.13
diff --cc integrate_test.sh
index 16e6915,0000000..16e6915
mode 100755,000000..100644
--- a/integrate_test.sh
+++ b/integrate_test.sh
diff --cc registry/kubernetes/README.md
index 954187d,0000000..b322b42
mode 100644,000000..100644
--- a/registry/kubernetes/README.md
+++ b/registry/kubernetes/README.md
@@@ -1,29 -1,0 +1,29 @@@
- ## kubernetes
-
- ```bash
-
- # create service-account
- kubectl create -f ./registry/kubernetes/sa.yaml
-
- # create role
- kubectl create -f ./registry/kubernetes/role.yaml
-
- # bind role and service-account
- kubectl create -f ./registry/kubernetes/role-binding.yaml
-
- # create server
- kubectl create -f ./registry/kubernetes/server.yaml
-
- # create client
- kubectl create -f ./registry/kubernetes/client.yaml
-
- # read the client log
- kubectl logs -f client
-
- ## uninstall
- kubectl delete -f ./registry/kubernetes/sa.yaml
- kubectl delete -f ./registry/kubernetes/role.yaml
- kubectl delete -f ./registry/kubernetes/role-binding.yaml
- kubectl delete -f ./registry/kubernetes/server.yaml
- kubectl delete -f ./registry/kubernetes/client.yaml
++## kubernetes
++
++```bash
++
++# create service-account
++kubectl create -f ./registry/kubernetes/sa.yaml
++
++# create role
++kubectl create -f ./registry/kubernetes/role.yaml
++
++# bind role and service-account
++kubectl create -f ./registry/kubernetes/role-binding.yaml
++
++# create server
++kubectl create -f ./registry/kubernetes/server.yaml
++
++# create client
++kubectl create -f ./registry/kubernetes/client.yaml
++
++# read the client log
++kubectl logs -f client
++
++## uninstall
++kubectl delete -f ./registry/kubernetes/sa.yaml
++kubectl delete -f ./registry/kubernetes/role.yaml
++kubectl delete -f ./registry/kubernetes/role-binding.yaml
++kubectl delete -f ./registry/kubernetes/server.yaml
++kubectl delete -f ./registry/kubernetes/client.yaml
+```
diff --cc seata/client/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/seata/client/profiles/dev/log.yml
+++ b/seata/client/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc seata/client/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/seata/client/profiles/release/log.yml
+++ b/seata/client/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "warn"
++development: true
++disableCaller: true
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc seata/client/profiles/test/log.yml
index baee0b7,0000000..f93d3c7
mode 100644,000000..100644
--- a/seata/client/profiles/test/log.yml
+++ b/seata/client/profiles/test/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "info"
- development: false
- disableCaller: false
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "info"
++development: false
++disableCaller: false
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc seata/order-svc/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/seata/order-svc/profiles/dev/log.yml
+++ b/seata/order-svc/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc seata/order-svc/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/seata/order-svc/profiles/release/log.yml
+++ b/seata/order-svc/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "warn"
++development: true
++disableCaller: true
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc seata/order-svc/profiles/test/log.yml
index baee0b7,0000000..f93d3c7
mode 100644,000000..100644
--- a/seata/order-svc/profiles/test/log.yml
+++ b/seata/order-svc/profiles/test/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "info"
- development: false
- disableCaller: false
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "info"
++development: false
++disableCaller: false
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc seata/product-svc/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/seata/product-svc/profiles/dev/log.yml
+++ b/seata/product-svc/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc seata/product-svc/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/seata/product-svc/profiles/release/log.yml
+++ b/seata/product-svc/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "warn"
++development: true
++disableCaller: true
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc seata/product-svc/profiles/test/log.yml
index baee0b7,0000000..f93d3c7
mode 100644,000000..100644
--- a/seata/product-svc/profiles/test/log.yml
+++ b/seata/product-svc/profiles/test/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "info"
- development: false
- disableCaller: false
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "info"
++development: false
++disableCaller: false
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc tracing/dubbo/go-client/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/tracing/dubbo/go-client/profiles/dev/log.yml
+++ b/tracing/dubbo/go-client/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc tracing/dubbo/go-client/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/tracing/dubbo/go-client/profiles/release/log.yml
+++ b/tracing/dubbo/go-client/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "warn"
++development: true
++disableCaller: true
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc tracing/dubbo/go-client/profiles/test/log.yml
index baee0b7,0000000..f93d3c7
mode 100644,000000..100644
--- a/tracing/dubbo/go-client/profiles/test/log.yml
+++ b/tracing/dubbo/go-client/profiles/test/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "info"
- development: false
- disableCaller: false
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "info"
++development: false
++disableCaller: false
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc tracing/dubbo/go-server/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/tracing/dubbo/go-server/profiles/dev/log.yml
+++ b/tracing/dubbo/go-server/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc tracing/dubbo/go-server/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/tracing/dubbo/go-server/profiles/release/log.yml
+++ b/tracing/dubbo/go-server/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "warn"
++development: true
++disableCaller: true
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc tracing/dubbo/go-server/profiles/test/log.yml
index baee0b7,0000000..f93d3c7
mode 100644,000000..100644
--- a/tracing/dubbo/go-server/profiles/test/log.yml
+++ b/tracing/dubbo/go-server/profiles/test/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "info"
- development: false
- disableCaller: false
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "info"
++development: false
++disableCaller: false
++disableStacktrace: true
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc tracing/dubbo/java-client/pom.xml
index 4065414,0000000..445b924
mode 100644,000000..100644
--- a/tracing/dubbo/java-client/pom.xml
+++ b/tracing/dubbo/java-client/pom.xml
@@@ -1,230 -1,0 +1,230 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
-
- <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>com.ikurento</groupId>
- <artifactId>user-info-client</artifactId>
- <packaging>jar</packaging>
- <version>0.2.0</version>
- <description>The demo consumer module of dubbo project</description>
-
- <properties>
- <skip_maven_deploy>false</skip_maven_deploy>
-
- <dubbo-jsonrpc-version>1.0.1</dubbo-jsonrpc-version>
- <dubbo-version>2.6.5</dubbo-version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo-dependencies-bom</artifactId>
- <version>${dubbo-version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>com.qianmi</groupId>
- <artifactId>dubbo-rpc-jsonrpc</artifactId>
- <version>${dubbo-jsonrpc-version}</version>
- </dependency>
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- <version>${dubbo-version}</version>
- </dependency>
-
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <version>2.12.0</version>
- </dependency>
-
- <dependency>
- <groupId>org.javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.20.0-GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.netty</groupId>
- <artifactId>netty</artifactId>
- <version>3.2.5.Final</version>
- </dependency>
- <dependency>
- <groupId>org.apache.mina</groupId>
- <artifactId>mina-core</artifactId>
- <version>1.1.7</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.grizzly</groupId>
- <artifactId>grizzly-core</artifactId>
- <version>2.1.4</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.5.7</version>
- </dependency>
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>fastjson</artifactId>
- <version>1.2.56</version>
- </dependency>
- <dependency>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- <version>1.4.7</version>
- </dependency>
- <dependency>
- <groupId>org.apache.bsf</groupId>
- <artifactId>bsf-api</artifactId>
- <version>3.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <version>3.4.14</version>
- </dependency>
- <dependency>
- <groupId>com.github.sgroschupf</groupId>
- <artifactId>zkclient</artifactId>
- <version>0.1</version>
- </dependency>
- <dependency>
- <groupId>com.netflix.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <version>1.1.16</version>
- </dependency>
- <dependency>
- <groupId>com.googlecode.xmemcached</groupId>
- <artifactId>xmemcached</artifactId>
- <version>1.3.6</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-simple</artifactId>
- <version>2.6.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http</artifactId>
- <version>2.6.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.thrift</groupId>
- <artifactId>libthrift</artifactId>
- <version>0.12.0</version>
- </dependency>
- <dependency>
- <groupId>com.caucho</groupId>
- <artifactId>hessian</artifactId>
- <version>4.0.7</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- <version>6.1.26</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.16</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.6.2</version>
- </dependency>
- <dependency>
- <groupId>redis.clients</groupId>
- <artifactId>jedis</artifactId>
- <version>2.1.0</version>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>1.0.0.GA</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>4.2.0.Final</version>
- </dependency>
- <dependency>
- <groupId>javax.cache</groupId>
- <artifactId>cache-api</artifactId>
- <version>0.4</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>unpack</id>
- <phase>package</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- <version>${dubbo-version}</version>
- <outputDirectory>${project.build.directory}/dubbo</outputDirectory>
- <includes>META-INF/assembly/**</includes>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptor>src/main/assembly/assembly.xml</descriptor>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </project>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++
++<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
++ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
++ <modelVersion>4.0.0</modelVersion>
++
++ <groupId>com.ikurento</groupId>
++ <artifactId>user-info-client</artifactId>
++ <packaging>jar</packaging>
++ <version>0.2.0</version>
++ <description>The demo consumer module of dubbo project</description>
++
++ <properties>
++ <skip_maven_deploy>false</skip_maven_deploy>
++
++ <dubbo-jsonrpc-version>1.0.1</dubbo-jsonrpc-version>
++ <dubbo-version>2.6.5</dubbo-version>
++ </properties>
++
++ <dependencyManagement>
++ <dependencies>
++ <dependency>
++ <groupId>com.alibaba</groupId>
++ <artifactId>dubbo-dependencies-bom</artifactId>
++ <version>${dubbo-version}</version>
++ <type>pom</type>
++ <scope>import</scope>
++ </dependency>
++ </dependencies>
++ </dependencyManagement>
++
++ <dependencies>
++ <dependency>
++ <groupId>com.qianmi</groupId>
++ <artifactId>dubbo-rpc-jsonrpc</artifactId>
++ <version>${dubbo-jsonrpc-version}</version>
++ </dependency>
++ <dependency>
++ <groupId>com.alibaba</groupId>
++ <artifactId>dubbo</artifactId>
++ <version>${dubbo-version}</version>
++ </dependency>
++
++ <dependency>
++ <groupId>io.netty</groupId>
++ <artifactId>netty-all</artifactId>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.curator</groupId>
++ <artifactId>curator-framework</artifactId>
++ <version>2.12.0</version>
++ </dependency>
++
++ <dependency>
++ <groupId>org.javassist</groupId>
++ <artifactId>javassist</artifactId>
++ <version>3.20.0-GA</version>
++ </dependency>
++ <dependency>
++ <groupId>org.jboss.netty</groupId>
++ <artifactId>netty</artifactId>
++ <version>3.2.5.Final</version>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.mina</groupId>
++ <artifactId>mina-core</artifactId>
++ <version>1.1.7</version>
++ </dependency>
++ <dependency>
++ <groupId>org.glassfish.grizzly</groupId>
++ <artifactId>grizzly-core</artifactId>
++ <version>2.1.4</version>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.httpcomponents</groupId>
++ <artifactId>httpclient</artifactId>
++ <version>4.5.7</version>
++ </dependency>
++ <dependency>
++ <groupId>com.alibaba</groupId>
++ <artifactId>fastjson</artifactId>
++ <version>1.2.56</version>
++ </dependency>
++ <dependency>
++ <groupId>com.thoughtworks.xstream</groupId>
++ <artifactId>xstream</artifactId>
++ <version>1.4.7</version>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.bsf</groupId>
++ <artifactId>bsf-api</artifactId>
++ <version>3.1</version>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.zookeeper</groupId>
++ <artifactId>zookeeper</artifactId>
++ <version>3.4.14</version>
++ </dependency>
++ <dependency>
++ <groupId>com.github.sgroschupf</groupId>
++ <artifactId>zkclient</artifactId>
++ <version>0.1</version>
++ </dependency>
++ <dependency>
++ <groupId>com.netflix.curator</groupId>
++ <artifactId>curator-framework</artifactId>
++ <version>1.1.16</version>
++ </dependency>
++ <dependency>
++ <groupId>com.googlecode.xmemcached</groupId>
++ <artifactId>xmemcached</artifactId>
++ <version>1.3.6</version>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.cxf</groupId>
++ <artifactId>cxf-rt-frontend-simple</artifactId>
++ <version>2.6.1</version>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.cxf</groupId>
++ <artifactId>cxf-rt-transports-http</artifactId>
++ <version>2.6.1</version>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.thrift</groupId>
++ <artifactId>libthrift</artifactId>
++ <version>0.12.0</version>
++ </dependency>
++ <dependency>
++ <groupId>com.caucho</groupId>
++ <artifactId>hessian</artifactId>
++ <version>4.0.7</version>
++ </dependency>
++ <dependency>
++ <groupId>javax.servlet</groupId>
++ <artifactId>servlet-api</artifactId>
++ <version>2.5</version>
++ </dependency>
++ <dependency>
++ <groupId>org.mortbay.jetty</groupId>
++ <artifactId>jetty</artifactId>
++ <version>6.1.26</version>
++ </dependency>
++ <dependency>
++ <groupId>log4j</groupId>
++ <artifactId>log4j</artifactId>
++ <version>1.2.16</version>
++ </dependency>
++ <dependency>
++ <groupId>org.slf4j</groupId>
++ <artifactId>slf4j-api</artifactId>
++ <version>1.6.2</version>
++ </dependency>
++ <dependency>
++ <groupId>redis.clients</groupId>
++ <artifactId>jedis</artifactId>
++ <version>2.1.0</version>
++ </dependency>
++ <dependency>
++ <groupId>javax.validation</groupId>
++ <artifactId>validation-api</artifactId>
++ <version>1.0.0.GA</version>
++ </dependency>
++ <dependency>
++ <groupId>org.hibernate</groupId>
++ <artifactId>hibernate-validator</artifactId>
++ <version>4.2.0.Final</version>
++ </dependency>
++ <dependency>
++ <groupId>javax.cache</groupId>
++ <artifactId>cache-api</artifactId>
++ <version>0.4</version>
++ </dependency>
++ </dependencies>
++ <build>
++ <plugins>
++ <plugin>
++ <artifactId>maven-dependency-plugin</artifactId>
++ <executions>
++ <execution>
++ <id>unpack</id>
++ <phase>package</phase>
++ <goals>
++ <goal>unpack</goal>
++ </goals>
++ <configuration>
++ <artifactItems>
++ <artifactItem>
++ <groupId>com.alibaba</groupId>
++ <artifactId>dubbo</artifactId>
++ <version>${dubbo-version}</version>
++ <outputDirectory>${project.build.directory}/dubbo</outputDirectory>
++ <includes>META-INF/assembly/**</includes>
++ </artifactItem>
++ </artifactItems>
++ </configuration>
++ </execution>
++ </executions>
++ </plugin>
++ <plugin>
++ <artifactId>maven-assembly-plugin</artifactId>
++ <configuration>
++ <descriptor>src/main/assembly/assembly.xml</descriptor>
++ </configuration>
++ <executions>
++ <execution>
++ <id>make-assembly</id>
++ <phase>package</phase>
++ <goals>
++ <goal>single</goal>
++ </goals>
++ </execution>
++ </executions>
++ </plugin>
++ </plugins>
++ </build>
++</project>
diff --cc tracing/dubbo/java-client/src/main/assembly/assembly.xml
index bc00a06,0000000..84f5499
mode 100644,000000..100644
--- a/tracing/dubbo/java-client/src/main/assembly/assembly.xml
+++ b/tracing/dubbo/java-client/src/main/assembly/assembly.xml
@@@ -1,43 -1,0 +1,43 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
-
- <assembly>
- <id>assembly</id>
- <formats>
- <format>tar.gz</format>
- </formats>
- <includeBaseDirectory>true</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>${project.build.directory}/dubbo/META-INF/assembly/bin</directory>
- <outputDirectory>bin</outputDirectory>
- <fileMode>0755</fileMode>
- </fileSet>
- <fileSet>
- <directory>src/main/resources</directory>
- <includes>
- <include>dubbo.properties</include>
- <include>log4j.*</include>
- </includes>
- <outputDirectory>conf</outputDirectory>
- <fileMode>0644</fileMode>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <outputDirectory>lib</outputDirectory>
- </dependencySet>
- </dependencySets>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++
++<assembly>
++ <id>assembly</id>
++ <formats>
++ <format>tar.gz</format>
++ </formats>
++ <includeBaseDirectory>true</includeBaseDirectory>
++ <fileSets>
++ <fileSet>
++ <directory>${project.build.directory}/dubbo/META-INF/assembly/bin</directory>
++ <outputDirectory>bin</outputDirectory>
++ <fileMode>0755</fileMode>
++ </fileSet>
++ <fileSet>
++ <directory>src/main/resources</directory>
++ <includes>
++ <include>dubbo.properties</include>
++ <include>log4j.*</include>
++ </includes>
++ <outputDirectory>conf</outputDirectory>
++ <fileMode>0644</fileMode>
++ </fileSet>
++ </fileSets>
++ <dependencySets>
++ <dependencySet>
++ <outputDirectory>lib</outputDirectory>
++ </dependencySet>
++ </dependencySets>
+</assembly>
diff --cc tracing/dubbo/java-client/src/main/java/com/ikurento/user/User.java
index 666e904,0000000..1526244
mode 100644,000000..100644
--- a/tracing/dubbo/java-client/src/main/java/com/ikurento/user/User.java
+++ b/tracing/dubbo/java-client/src/main/java/com/ikurento/user/User.java
@@@ -1,76 -1,0 +1,76 @@@
- /*
- * 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.ikurento.user;
-
- import java.util.Date;
-
- public class User {
-
- private String id;
-
- private String name;
-
- private int age;
-
- private Date time = new Date();
-
-
- public User() {
- }
-
-
- public User(String id, String name, int age) {
- this.id = id;
- this.name = name;
- this.age = age;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- 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 Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
-
- }
++/*
++ * 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.ikurento.user;
++
++import java.util.Date;
++
++public class User {
++
++ private String id;
++
++ private String name;
++
++ private int age;
++
++ private Date time = new Date();
++
++
++ public User() {
++ }
++
++
++ public User(String id, String name, int age) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ }
++
++ public String getId() {
++ return id;
++ }
++
++ public void setId(String id) {
++ this.id = id;
++ }
++
++ 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 Date getTime() {
++ return time;
++ }
++
++ public void setTime(Date time) {
++ this.time = time;
++ }
++
++
++}
diff --cc tracing/dubbo/java-client/src/main/java/com/ikurento/user/UserProvider.java
index 67a836a,0000000..f42452d
mode 100644,000000..100644
--- a/tracing/dubbo/java-client/src/main/java/com/ikurento/user/UserProvider.java
+++ b/tracing/dubbo/java-client/src/main/java/com/ikurento/user/UserProvider.java
@@@ -1,18 -1,0 +1,18 @@@
- /*
- * 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.
- */
- package com.ikurento.user;
-
- public interface UserProvider {
- User GetUser(String userId);
- }
++/*
++ * 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.
++ */
++package com.ikurento.user;
++
++public interface UserProvider {
++ User GetUser(String userId);
++}
diff --cc tracing/dubbo/java-client/src/main/resources/META-INF/spring/service.xml
index 529f63e,0000000..e4f5fda
mode 100644,000000..100644
--- a/tracing/dubbo/java-client/src/main/resources/META-INF/spring/service.xml
+++ b/tracing/dubbo/java-client/src/main/resources/META-INF/spring/service.xml
@@@ -1,27 -1,0 +1,27 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
-
- <bean class="com.ikurento.user.Consumer" init-method="start">
- <!-- 声明这个类 要使用的服务名-->
- <property name="userProvider" ref="userProvider" />
- </bean>
-
- </beans>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++<beans xmlns="http://www.springframework.org/schema/beans"
++ xmlns:context="http://www.springframework.org/schema/context"
++ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
++ xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
++ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
++ http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
++
++ <bean class="com.ikurento.user.Consumer" init-method="start">
++ <!-- 声明这个类 要使用的服务名-->
++ <property name="userProvider" ref="userProvider" />
++ </bean>
++
++</beans>
diff --cc tracing/dubbo/java-client/src/main/resources/dubbo.properties
index e561efc,0000000..701dd46
mode 100644,000000..100644
--- a/tracing/dubbo/java-client/src/main/resources/dubbo.properties
+++ b/tracing/dubbo/java-client/src/main/resources/dubbo.properties
@@@ -1,13 -1,0 +1,13 @@@
- ### dubboע���������� ###
- dubbo.container = log4j,spring
- dubbo.application.name = user-info-client
- dubbo.application.owner = AlexStocks
- dubbo.application.environment = product
- dubbo.registry.address = zookeeper://127.0.0.1:2181
- dubbo.monitor.protocol = zookeeper
- dubbo.consumer.timeout = 10000
- dubbo.provider.timeout = 10000
- dubbo.protocol.name = dubbo
-
- dubbo.log4j.file = logs/client.log
- dubbo.log4j.level = WARN
++### dubboע���������� ###
++dubbo.container = log4j,spring
++dubbo.application.name = user-info-client
++dubbo.application.owner = AlexStocks
++dubbo.application.environment = product
++dubbo.registry.address = zookeeper://127.0.0.1:2181
++dubbo.monitor.protocol = zookeeper
++dubbo.consumer.timeout = 10000
++dubbo.provider.timeout = 10000
++dubbo.protocol.name = dubbo
++
++dubbo.log4j.file = logs/client.log
++dubbo.log4j.level = WARN
diff --cc tracing/dubbo/java-server/src/main/assembly/assembly.xml
index 5b4075c,0000000..c0aeffd
mode 100644,000000..100644
--- a/tracing/dubbo/java-server/src/main/assembly/assembly.xml
+++ b/tracing/dubbo/java-server/src/main/assembly/assembly.xml
@@@ -1,44 -1,0 +1,44 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
- <assembly>
- <id>assembly</id>
- <formats>
- <format>tar.gz</format>
- </formats>
- <includeBaseDirectory>true</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>${project.build.directory}/dubbo/META-INF/assembly/bin</directory>
- <outputDirectory>bin</outputDirectory>
- <fileMode>0755</fileMode>
- <directoryMode>0755</directoryMode>
- </fileSet>
- <fileSet>
- <directory>src/main/resources</directory>
- <includes>
- <include>dubbo.properties</include>
- <include>log4j.*</include>
- </includes>
- <outputDirectory>conf</outputDirectory>
- <fileMode>0644</fileMode>
- <directoryMode>0755</directoryMode>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <outputDirectory>lib</outputDirectory>
- </dependencySet>
- </dependencySets>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++<assembly>
++ <id>assembly</id>
++ <formats>
++ <format>tar.gz</format>
++ </formats>
++ <includeBaseDirectory>true</includeBaseDirectory>
++ <fileSets>
++ <fileSet>
++ <directory>${project.build.directory}/dubbo/META-INF/assembly/bin</directory>
++ <outputDirectory>bin</outputDirectory>
++ <fileMode>0755</fileMode>
++ <directoryMode>0755</directoryMode>
++ </fileSet>
++ <fileSet>
++ <directory>src/main/resources</directory>
++ <includes>
++ <include>dubbo.properties</include>
++ <include>log4j.*</include>
++ </includes>
++ <outputDirectory>conf</outputDirectory>
++ <fileMode>0644</fileMode>
++ <directoryMode>0755</directoryMode>
++ </fileSet>
++ </fileSets>
++ <dependencySets>
++ <dependencySet>
++ <outputDirectory>lib</outputDirectory>
++ </dependencySet>
++ </dependencySets>
+</assembly>
diff --cc tracing/dubbo/java-server/src/main/java/com/ikurento/user/User.java
index fd2cafb,0000000..ac046bd
mode 100644,000000..100644
--- a/tracing/dubbo/java-server/src/main/java/com/ikurento/user/User.java
+++ b/tracing/dubbo/java-server/src/main/java/com/ikurento/user/User.java
@@@ -1,86 -1,0 +1,86 @@@
- /*
- * 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.ikurento.user;
-
- import java.util.Date;
- import java.io.Serializable;
-
- public class User implements Serializable {
-
- private String id;
-
- private String name;
-
- private int age;
-
- private Date time = new Date();
-
- public User() {
- }
-
- public User(String id, String name, int age) {
- this.id = id;
- this.name = name;
- this.age = age;
- }
-
- public User(String id, String name, int age, Date time) {
- this.id = id;
- this.name = name;
- this.age = age;
- this.time = time;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- 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 Date getTime() {
- return time;
- }
-
- public void setTime(Date time) {
- this.time = time;
- }
-
-
-
- public String toString() {
- return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time +"}";
- }
- }
++/*
++ * 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.ikurento.user;
++
++import java.util.Date;
++import java.io.Serializable;
++
++public class User implements Serializable {
++
++ private String id;
++
++ private String name;
++
++ private int age;
++
++ private Date time = new Date();
++
++ public User() {
++ }
++
++ public User(String id, String name, int age) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ }
++
++ public User(String id, String name, int age, Date time) {
++ this.id = id;
++ this.name = name;
++ this.age = age;
++ this.time = time;
++ }
++
++ public String getId() {
++ return id;
++ }
++
++ public void setId(String id) {
++ this.id = id;
++ }
++
++ 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 Date getTime() {
++ return time;
++ }
++
++ public void setTime(Date time) {
++ this.time = time;
++ }
++
++
++
++ public String toString() {
++ return "User{id:" + id + ", name:" + name + ", age:" + age + ", time:" + time +"}";
++ }
++}
diff --cc tracing/dubbo/java-server/src/main/java/com/ikurento/user/UserProvider.java
index b1eeab8,0000000..831588d
mode 100644,000000..100644
--- a/tracing/dubbo/java-server/src/main/java/com/ikurento/user/UserProvider.java
+++ b/tracing/dubbo/java-server/src/main/java/com/ikurento/user/UserProvider.java
@@@ -1,24 -1,0 +1,24 @@@
- /*
- * 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.ikurento.user;
-
- public interface UserProvider {
-
- User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
-
- }
++/*
++ * 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.ikurento.user;
++
++public interface UserProvider {
++
++ User GetUser(String userId); // the first alpha is Upper case to compatible with golang.
++
++}
diff --cc tracing/dubbo/java-server/src/main/java/com/ikurento/user/UserProviderImpl.java
index 0d66c43,0000000..10dbbc3
mode 100644,000000..100644
--- a/tracing/dubbo/java-server/src/main/java/com/ikurento/user/UserProviderImpl.java
+++ b/tracing/dubbo/java-server/src/main/java/com/ikurento/user/UserProviderImpl.java
@@@ -1,30 -1,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.ikurento.user;
-
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
-
- public class UserProviderImpl implements UserProvider {
- private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); //Output to user-server.log
-
- public User GetUser(String userId) {
- return new User(userId, "zhangsan", 18);
- }
-
- }
++/*
++ * 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.ikurento.user;
++
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++public class UserProviderImpl implements UserProvider {
++ private static final Logger LOG = LoggerFactory.getLogger("UserLogger"); //Output to user-server.log
++
++ public User GetUser(String userId) {
++ return new User(userId, "zhangsan", 18);
++ }
++
++}
diff --cc tracing/dubbo/java-server/src/main/resources/META-INF/spring/dubbo.provider.xml
index 3fca067,0000000..7351324
mode 100644,000000..100644
--- a/tracing/dubbo/java-server/src/main/resources/META-INF/spring/dubbo.provider.xml
+++ b/tracing/dubbo/java-server/src/main/resources/META-INF/spring/dubbo.provider.xml
@@@ -1,33 -1,0 +1,33 @@@
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
-
- <!-- 应用名 -->
- <dubbo:application name="user-info-server"/>
- <!-- 连接到哪个本地注册中心 -->
- <dubbo:registry id="ikurento" address="zookeeper://127.0.0.1:2181" />
- <!-- 用dubbo协议在20880端口暴露服务 -->
- <!-- dubbo:protocol host="127.0.0.1" / -->
- <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
- <!-- 声明需要暴露的服务接口 -->
- <dubbo:service id="aaa" registry="ikurento" timeout="3000" interface="com.ikurento.user.UserProvider" ref="demoService"/>
-
- <bean id="demoService" class="com.ikurento.user.UserProviderImpl" />
-
- </beans>
++<?xml version="1.0" encoding="UTF-8"?>
++<!--
++ 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.
++-->
++<beans xmlns="http://www.springframework.org/schema/beans"
++ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
++ xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
++ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
++ http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
++
++ <!-- 应用名 -->
++ <dubbo:application name="user-info-server"/>
++ <!-- 连接到哪个本地注册中心 -->
++ <dubbo:registry id="ikurento" address="zookeeper://127.0.0.1:2181" />
++ <!-- 用dubbo协议在20880端口暴露服务 -->
++ <!-- dubbo:protocol host="127.0.0.1" / -->
++ <dubbo:protocol id="dubbo" name="dubbo" host="127.0.0.1" port="20010" />
++ <!-- 声明需要暴露的服务接口 -->
++ <dubbo:service id="aaa" registry="ikurento" timeout="3000" interface="com.ikurento.user.UserProvider" ref="demoService"/>
++
++ <bean id="demoService" class="com.ikurento.user.UserProviderImpl" />
++
++</beans>
diff --cc tracing/dubbo/java-server/src/main/resources/dubbo.properties
index 2826f31,0000000..54f8a16
mode 100644,000000..100644
--- a/tracing/dubbo/java-server/src/main/resources/dubbo.properties
+++ b/tracing/dubbo/java-server/src/main/resources/dubbo.properties
@@@ -1,14 -1,0 +1,14 @@@
- ### dubbo注册中心配置 ##
- dubbo.container = log4j,spring
- dubbo.application.name = user-info-server
- dubbo.application.environment = product
- dubbo.application.owner = AlexStocks
- dubbo.registry.address = 127.0.0.1:2181
- dubbo.registry.protocol = zookeeper
- dubbo.consumer.timeout = 10000
- dubbo.provider.timeout = 10000
- dubbo.protocol.name = dubbo
- dubbo.protocol.port = 10000
-
- dubbo.log4j.file = logs/dubbo.log
- dubbo.log4j.level = INFO
++### dubbo注册中心配置 ##
++dubbo.container = log4j,spring
++dubbo.application.name = user-info-server
++dubbo.application.environment = product
++dubbo.application.owner = AlexStocks
++dubbo.registry.address = 127.0.0.1:2181
++dubbo.registry.protocol = zookeeper
++dubbo.consumer.timeout = 10000
++dubbo.provider.timeout = 10000
++dubbo.protocol.name = dubbo
++dubbo.protocol.port = 10000
++
++dubbo.log4j.file = logs/dubbo.log
++dubbo.log4j.level = INFO
diff --cc tracing/dubbo/java-server/src/main/resources/log4j.properties
index 13c8049,0000000..806e33d
mode 100644,000000..100644
--- a/tracing/dubbo/java-server/src/main/resources/log4j.properties
+++ b/tracing/dubbo/java-server/src/main/resources/log4j.properties
@@@ -1,20 -1,0 +1,20 @@@
- ## Logger configure file for myproject
- log.dir=logs/
- datestamp=yyyy-MM-dd/HH:mm:ss.SSS
-
- log4j.rootLogger=DEBUG, file, console
-
- log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
- log4j.appender.file.threshold=DEBUG
- log4j.appender.file.File=${log.dir}/log4j.log
- log4j.appender.file.DatePattern=-yyyyMMddHH
- log4j.appender.file.ImmediateFlush=true
- log4j.appender.file.Append=true
- log4j.appender.file.layout=org.apache.log4j.PatternLayout
- log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
- log4j.appender.console=org.apache.log4j.ConsoleAppender
- log4j.appender.console.Threshold=DEBUG
- log4j.appender.console.layout=org.apache.log4j.PatternLayout
- log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
-
++## Logger configure file for myproject
++log.dir=logs/
++datestamp=yyyy-MM-dd/HH:mm:ss.SSS
++
++log4j.rootLogger=DEBUG, file, console
++
++log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
++log4j.appender.file.threshold=DEBUG
++log4j.appender.file.File=${log.dir}/log4j.log
++log4j.appender.file.DatePattern=-yyyyMMddHH
++log4j.appender.file.ImmediateFlush=true
++log4j.appender.file.Append=true
++log4j.appender.file.layout=org.apache.log4j.PatternLayout
++log4j.appender.file.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
++log4j.appender.console=org.apache.log4j.ConsoleAppender
++log4j.appender.console.Threshold=DEBUG
++log4j.appender.console.layout=org.apache.log4j.PatternLayout
++log4j.appender.console.layout.ConversionPattern=%d{${datestamp}} %5p: %l - %m%n
++
diff --cc tracing/jsonrpc/go-client/profiles/dev/log.yml
index 59fa427,0000000..3ed242d
mode 100644,000000..100644
--- a/tracing/jsonrpc/go-client/profiles/dev/log.yml
+++ b/tracing/jsonrpc/go-client/profiles/dev/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "debug"
- development: true
- disableCaller: false
- disableStacktrace: false
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
- messageKey: "message"
- levelKey: "level"
- timeKey: "time"
- nameKey: "logger"
- callerKey: "caller"
- stacktraceKey: "stacktrace"
- lineEnding: ""
- levelEncoder: "capitalColor"
- timeEncoder: "iso8601"
- durationEncoder: "seconds"
- callerEncoder: "short"
- nameEncoder: ""
-
- outputPaths:
- - "stderr"
- errorOutputPaths:
- - "stderr"
- initialFields:
++
++level: "debug"
++development: true
++disableCaller: false
++disableStacktrace: false
++sampling:
++encoding: "console"
++
++# encoder
++encoderConfig:
++ messageKey: "message"
++ levelKey: "level"
++ timeKey: "time"
++ nameKey: "logger"
++ callerKey: "caller"
++ stacktraceKey: "stacktrace"
++ lineEnding: ""
++ levelEncoder: "capitalColor"
++ timeEncoder: "iso8601"
++ durationEncoder: "seconds"
++ callerEncoder: "short"
++ nameEncoder: ""
++
++outputPaths:
++ - "stderr"
++errorOutputPaths:
++ - "stderr"
++initialFields:
diff --cc tracing/jsonrpc/go-client/profiles/release/log.yml
index e0514be,0000000..d860624
mode 100644,000000..100644
--- a/tracing/jsonrpc/go-client/profiles/release/log.yml
+++ b/tracing/jsonrpc/go-client/profiles/release/log.yml
@@@ -1,28 -1,0 +1,28 @@@
-
- level: "warn"
- development: true
- disableCaller: true
- disableStacktrace: true
- sampling:
- encoding: "console"
-
- # encoder
- encoderConfig:
... 294 lines suppressed ...