[incubator-dubbo-samples] branch samples-for-2.7.0-SNAPSHOT updated: resilience4j dubbo sample

2019-01-01 Thread victory
This is an automated email from the ASF dual-hosted git repository.

victory pushed a commit to branch samples-for-2.7.0-SNAPSHOT
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-samples.git


The following commit(s) were added to refs/heads/samples-for-2.7.0-SNAPSHOT by 
this push:
 new 1b85eb6  resilience4j dubbo sample
1b85eb6 is described below

commit 1b85eb6f974dcaa9b8246600dc091cd37e34d3e9
Author: cvictory 
AuthorDate: Wed Jan 2 15:10:20 2019 +0800

resilience4j dubbo sample
---
 .../apache/dubbo/samples/api/GreetingsService.java |   6 +-
 .../dubbo/samples/governance/AsyncConsumer.java|  23 ++--
 .../governance/filter/AsyncPostprocessFilter.java  |   9 +-
 .../main/resources/spring/dubbo-demo-consumer.xml  |   2 +-
 .../main/resources/spring/dubbo-demo-provider.xml  |   4 +-
 .../Resilience4jAnnotationConsumer.java|   2 +-
 .../resilience4j/action/AnnotationAction.java  |  39 --
 .../filter/Resilience4jCircuitBreakerFilter.java   |  39 +-
 .../filter/Resilience4jRateLimiterFilter.java  |  13 +-
 .../resilience4j/impl/AnnotationServiceImpl.java   |   2 +-
 .../impl/CircuitBreakerServiceImpl.java|  14 ++-
 .../resilience4j/impl/RateLimiterServiceImpl.java  |   2 +-
 .../resources/spring/dubbo-consumer.properties |   3 +-
 .../resources/spring/dubbo-provider.properties |   2 +-
 .../dubbo-samples-resilience4j-springboot2/pom.xml |  95 ++
 .../Resilience4jBootAnnotationConsumer.java|  58 -
 .../Resilience4jBootAnnotationProvider.java|  61 -
 .../EmbeddedZooKeeper.java |   2 +-
 .../api/AnnotationService.java |   2 +-
 .../api/CircuitBreakerService.java}|  10 +-
 .../api/RateLimiterService.java}   |  10 +-
 .../Resilience4jBootConsumerApplication.java   |  57 +
 .../consumer}/action/AnnotationAction.java |  10 +-
 .../action/CircuitBreakMethodWrapper.java} |  28 ++---
 .../consumer/action/CircuitBreakTypeWrapper.java}  |  28 ++---
 .../consumer/action/CircuitBreakerAction.java  | 138 +
 .../consumer/action/RateLimiterAction.java |  75 +++
 .../consumer/controller/TestController.java| 103 +++
 .../provider/DubbConfiguration.java}   |  15 ++-
 .../Resilience4jBootProviderApplication.java   |  67 ++
 .../provider}/impl/AnnotationServiceImpl.java  |  10 +-
 .../provider}/impl/CircuitBreakerServiceImpl.java  |  18 ++-
 .../provider}/impl/RateLimiterServiceImpl.java |   8 +-
 ...onsumer.properties => application-consumer.yml} |  16 ++-
 ...onsumer.properties => application-provider.yml} |  15 ++-
 .../{log4j.properties => application.yml}  |  28 +++--
 .../src/main/resources/logback-spring.xml  |  45 +++
 .../resources/spring/dubbo-consumer.properties |  11 +-
 .../resources/spring/dubbo-provider.properties |  11 +-
 dubbo-samples-resilience4j/pom.xml |   2 +-
 dubbo-samples-spring-boot-hystrix/pom.xml  |   6 +
 41 files changed, 813 insertions(+), 276 deletions(-)

diff --git 
a/dubbo-samples-api/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
 
b/dubbo-samples-api/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
index 5d21f1d..888d6cb 100644
--- 
a/dubbo-samples-api/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
+++ 
b/dubbo-samples-api/src/main/java/org/apache/dubbo/samples/api/GreetingsService.java
@@ -18,9 +18,9 @@
 
 package org.apache.dubbo.samples.api;
 
-import com.alibaba.dubbo.config.async.DubboAsync;
-
-@DubboAsync
+//import com.alibaba.dubbo.config.async.DubboAsync;
+//
+//@DubboAsync
 public interface GreetingsService {
 String sayHi(String name);
 }
diff --git 
a/dubbo-samples-async/dubbo-samples-async-generated-future/src/main/java/org/apache/dubbo/samples/governance/AsyncConsumer.java
 
b/dubbo-samples-async/dubbo-samples-async-generated-future/src/main/java/org/apache/dubbo/samples/governance/AsyncConsumer.java
index 7198a88..c5e16b1 100644
--- 
a/dubbo-samples-async/dubbo-samples-async-generated-future/src/main/java/org/apache/dubbo/samples/governance/AsyncConsumer.java
+++ 
b/dubbo-samples-async/dubbo-samples-async-generated-future/src/main/java/org/apache/dubbo/samples/governance/AsyncConsumer.java
@@ -19,26 +19,21 @@
 
 package org.apache.dubbo.samples.governance;
 
-import org.apache.dubbo.samples.api.GreetingsServiceAsync;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.util.concurrent.CompletableFuture;
-
 /**
  * CallbackConsumer
  */
 public class AsyncConsumer {
 
 public static void main(String[] args) throws Exception {
-ClassPathXmlApplicationContext context = new 
ClassPathXmlApplicationContext(new 
String[]{"META-INF/spring/async-consumer.xml"});
-context.start();
-
-final 

Re: Happy new year 2019

2019-01-01 Thread Xin Wang
> How about using get the current year by javascript?
So that, the year in the copyright do't need to update at next year.
Not a very good method . The javascript function depend on the user's pc .
If he time of pc is incorrect, the website will appear  incorrect.

老五 <176402...@qq.com> 于2019年1月2日周三 下午1:18写道:

> Happy New Year!
>
>
> How about using get the current year by javascript?
> So that, the year in the copyright do't need to update at next year.
>
>
> Here is my PR:
> https://github.com/apache/incubator-dubbo-website/pull/226
>
>
> -- 原始邮件 --
> 发件人: "Huxing Zhang";
> 发送时间: 2019年1月2日(星期三) 中午11:11
> 收件人: "dev";
>
> 主题: Happy new year 2019
>
>
>
> Hi community.
>
> Happy New Year!
>
> It is already 2019, we need to update the copyright NOTICE file for
> the new year.
>
> I filed an issue for incubator-dubbo and incubator-dubbo-website:
>
> * https://github.com/apache/incubator-dubbo/issues/3111
> * https://github.com/apache/incubator-dubbo-website/issues/224
>
> Please add more if there are something missing.
> Please send pull request if you are interested in contribution. :)
>
>
> --
> Best Regards!
> Huxing


Re: [Call for Help] Dubbo admin i18n support translation

2019-01-01 Thread Chen ZhiGuo
Hi, all
The translation of issues(#218) has been completed. 
By the way, issue(#219) is also completed. Issue (#219) is implemented through 
the 'LocalStorage' function of the browser.

When the user selects the language, record the user's choice and write to 
'LocalStorage' of the browser. When the user enters the page again or 
refreshes, read the data written before and load it.

On 2019/1/2, 11:13, "Huxing Zhang"  wrote:

Nice work!

Could you provide an example to show how user can contribute to this?
If we provide such an example, I think more users would like to contribute.

On Mon, Dec 31, 2018 at 8:13 PM Minxuan Zhuang  wrote:
>
> I've add i18n support for Dubbo admin frontend, and some translation need
> to be done, An issue with details is here:
> https://github.com/apache/incubator-dubbo-ops/issues/218, please submmit a
> pr to *i18n* branch, thanks



-- 
Best Regards!
Huxing




??????Happy new year 2019

2019-01-01 Thread ????
Happy New Year!


How about using get the current year by javascript? 
So that, the year in the copyright do't need to update at next year.


Here is my PR:
https://github.com/apache/incubator-dubbo-website/pull/226


--  --
??: "Huxing Zhang";
: 2019??1??2??(??) 11:11
??: "dev";

: Happy new year 2019



Hi community.

Happy New Year!

It is already 2019, we need to update the copyright NOTICE file for
the new year.

I filed an issue for incubator-dubbo and incubator-dubbo-website:

* https://github.com/apache/incubator-dubbo/issues/3111
* https://github.com/apache/incubator-dubbo-website/issues/224

Please add more if there are something missing.
Please send pull request if you are interested in contribution. :)


-- 
Best Regards??
Huxing

Re: [Call for Help] Dubbo admin i18n support translation

2019-01-01 Thread Huxing Zhang
Nice work!

Could you provide an example to show how user can contribute to this?
If we provide such an example, I think more users would like to contribute.

On Mon, Dec 31, 2018 at 8:13 PM Minxuan Zhuang  wrote:
>
> I've add i18n support for Dubbo admin frontend, and some translation need
> to be done, An issue with details is here:
> https://github.com/apache/incubator-dubbo-ops/issues/218, please submmit a
> pr to *i18n* branch, thanks



-- 
Best Regards!
Huxing


Happy new year 2019

2019-01-01 Thread Huxing Zhang
Hi community.

Happy New Year!

It is already 2019, we need to update the copyright NOTICE file for
the new year.

I filed an issue for incubator-dubbo and incubator-dubbo-website:

* https://github.com/apache/incubator-dubbo/issues/3111
* https://github.com/apache/incubator-dubbo-website/issues/224

Please add more if there are something missing.
Please send pull request if you are interested in contribution. :)


-- 
Best Regards!
Huxing