You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by GitBox <gi...@apache.org> on 2022/06/05 08:49:17 UTC

[GitHub] [incubator-shenyu] dragon-zhang opened a new issue, #3485: [Task] simplify the use of client annotations with @AliasFor

dragon-zhang opened a new issue, #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485

   ### Description
   
   For example, below is how we use `@ShenyuXXXXClient`:
   ```java
   @RestController
   @RequestMapping("/order")
   @ShenyuSpringCloudClient(path = "/order")
   public class OrderController {
   
       /**
        * Save order dto.
        *
        * @param orderDTO the order dto
        * @return the order dto
        */
       @PostMapping("/save")
       @ShenyuSpringCloudClient(path = "/save")
       public OrderDTO save(@RequestBody final OrderDTO orderDTO) {
           orderDTO.setName("hello world spring cloud save order");
           return orderDTO;
       }
   
   }
   ```
   After use `@AliasFor` with `@ShenyuSpringCloudClient` like below:
   ```java
   @Retention(RetentionPolicy.RUNTIME)
   @Target({ElementType.TYPE, ElementType.METHOD})
   public @interface ShenyuSpringCloudClient {
   
       /**
        * Path string.
        *
        * @return the string
        */
       @AliasFor(attribute = "path")
       String value() default "";
   
       /**
        * Path string.
        *
        * @return the string
        */
       @AliasFor(attribute = "value")
       String path() default "";
   
       /**
        * Rule name string.
        *
        * @return the string
        */
       String ruleName() default "";
   
       /**
        * Desc string.
        *
        * @return String string
        */
       String desc() default "";
   
       /**
        * Enabled boolean.
        *
        * @return the boolean
        */
       boolean enabled() default true;
   }
   ```
   We can simplify client annotation usage to:
   ```java
   @RestController
   @RequestMapping("/order")
   @ShenyuSpringCloudClient("/order")
   public class OrderController {
       
       /**
        * Save order dto.
        *
        * @param orderDTO the order dto
        * @return the order dto
        */
       @PostMapping("/save")
       @ShenyuSpringCloudClient("/save")
       public OrderDTO save(@RequestBody final OrderDTO orderDTO) {
           orderDTO.setName("hello world spring cloud save order");
           return orderDTO;
       }
       
   }
   ```
   If you have some great ideas, please leave a message below, let's discuss it.
   
   ### Task List
   
   1. - [ ] simplify @ShenyuDubboClient in `alibaba dubbo`;
   2. - [ ] simplify @ShenyuDubboClient in `apache dubbo`;
   3. - [ ] simplify @ShenyuGrpcClient;
   4. - [ ] simplify @ShenyuSpringMvcClient;
   5. - [ ] simplify @ShenyuMotanClient;
   6. - [ ] simplify @ShenyuSofaClient;
   7. - [ ] simplify @ShenyuTarsClient;
   8. - [ ] simplify @ShenyuSpringWebSocketClient;


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] Albertsirius commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
Albertsirius commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1147259782

   Hi, @dragon-zhang , can you assign ShenyuSpringMvcClient task to me?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] ChineseTony commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
ChineseTony commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1147492771

   Can i take task 5,thank you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] dragon-zhang commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
dragon-zhang commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1152213564

   > Can i take task 8,thank you.
   
   sure, thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] weihubeats commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
weihubeats commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1152389913

   Can i take task 7,thank you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] dragon-zhang commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
dragon-zhang commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1153763949

   Thanks for your contribution !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] ShawnSiao commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
ShawnSiao commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1147477350

   Can i take task 6,thank you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] dragon-zhang closed issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
dragon-zhang closed issue #3485: [Task] simplify the use of client annotations with @AliasFor
URL: https://github.com/apache/incubator-shenyu/issues/3485


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] sunshujie1990 commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
sunshujie1990 commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1148430460

   May i take task 1 and 2 for ShenyuDubboClient ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] dragon-zhang commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
dragon-zhang commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1153769462

   If you have other great ideas, please submit a new ISSUE .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] dragon-zhang commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
dragon-zhang commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1147310845

   > Hi, @dragon-zhang , can you assign ShenyuSpringMvcClient task to me?
   
   sure, enjoy the contribution !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] dragon-zhang commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
dragon-zhang commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1147478393

   > Can i take task 6,thank you.
   
   sure, why not.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] weihubeats commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
weihubeats commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1152100331

   Can i take task 8,thank you.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-shenyu] weihubeats commented on issue #3485: [Task] simplify the use of client annotations with @AliasFor

Posted by GitBox <gi...@apache.org>.
weihubeats commented on issue #3485:
URL: https://github.com/apache/incubator-shenyu/issues/3485#issuecomment-1149410658

   Can i take task 3,thank you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org