[WeOpen-Star] Add simpler client annotations with @AliasFor
How to Participation
- reply: [WeOpen Star]I would like to help
- add this wechat. note : 摘星
Description
As a downstream of https://github.com/apache/shenyu/issues/3485, this task needs you to add(do not delete any existing annotations) more simpler client annotations.
For example, below is how we use client annotation now:
@RestController
@RequestMapping("/order")
@ShenyuSpringCloudClient("/order")
public class OrderController {
@PostMapping("/save")
@ShenyuSpringCloudClient("/save")
public OrderDTO save(@RequestBody final OrderDTO orderDTO) {
orderDTO.setName("hello world spring cloud save order");
return orderDTO;
}
}
Does it seem a little repetitive? We can realize combined annotation through @AliasFor and org.springframework.core.annotation.AnnotatedElementUtils#findMergedAnnotation.
Notice: the newly added annotation needs to be compatible with all functions of other frameworks !
Use simplified annotations like below:
@RestController
@ShenyuRequestMapping("/order")
public class OrderController {
@ShenyuPostMapping("/save")
public OrderDTO save(@RequestBody final OrderDTO orderDTO) {
orderDTO.setName("hello world spring cloud save order");
return orderDTO;
}
}
You are welcome to make suggestions !
Task List
-
- [x] add
@ShenyuRequestMapping,@ShenyuGetMapping,@ShenyuPostMapping,@ShenyuPutMapping,@ShenyuDeleteMapping,@ShenyuPatchMappingforshenyu-client-springmvc; @ShawnJim
- [x] add
-
- [x] add
@ShenyuRequestMapping,@ShenyuGetMapping,@ShenyuPostMapping,@ShenyuPutMapping,@ShenyuDeleteMapping,@ShenyuPatchMappingforshenyu-client-springcloud; @ShawnJim
- [x] add
-
- [x] add
@ShenyuServiceforshenyu-client-alibaba-dubbo; @mangoGoForward
- [x] add
-
- [x] add
@ShenyuService,@ShenyuDubboServiceforshenyu-client-apache-dubbo; @mangoGoForward
- [x] add
-
- [ ] add
@ShenyuMotanServiceforshenyu-client-motan; @runqi-zhao
- [ ] add
-
- [ ] add
@ShenyuTarsServantforshenyu-client-tars; @HeZean
- [ ] add
-
- [x] add
@ShenyuServerEndpointforshenyu-client-websocket; @lahmXu
- [x] add
How to contributor
You can see this : Contributor Guide
-
I suggest you subscribe to shenyu dev mailing list, and when you encounter any problems, or when you finish, you can send an email to [email protected]
-
I suggest you git clone the source code and finish the changes. like this :
fork this to you repository : https://github.com/apache/shenyu.git
git clone [email protected]:${YOUR_USERNAME}/${TARGET_REPO}.git
git checkout -b a-dev-branch
git push origin a-dev-branch
Verification
After you modify file in verify local and you can see this : How to build shenyu .
After you pull request merged. You can verify to this : en-doc , zh-doc
[WeOpen Star] I would like to help. pls assign task [1,2] to me . thanks.
[WeOpen Star]I would like to help, Please assign task 7 to me, thanks!
[WeOpen Star] I would like to help with task 6. Can you assign me? Many thanks.
Hi, I'd like to work on task 3. [WeOpen Star]
hi, @dragon-zhang ,i can do task [1,2] . can you assign it to me? thx
Please reply [WeOpen Star]I would like to help and task number to get the task.
Hi, I'd like to work on task 6. Can you assign me? Many thanks.
Please reply [WeOpen Star]I would like to help and task number to get the task.
[WeOpen Star]I would like to help, task 4. task 4 is similar with task 3
[WeOpen Star]I would like to help, task 4. task 4 is similar with task 3
Yes, but due to different versions, different annotations need to be supported.
[WeOpen Star]I would like to help, please assign task 5 to me, thanks!
@runqi-zhao @HeZean How is the progress now?
Sorry for the delay, I'll submit a PR today
@runqi-zhao @HeZean How is the progress now?
Sorry for the delay, I'll submit a PR today