is it necessary to annotate @ShenyuspringCloudClient in the Controller layer?
Question
To use Shenyu, is it necessary to annotate @ShenyuspringCloudClient (path = "/save") in the Controller layer?
For example,
@PostMapping("/save")
@ShenyuSpringCloudClient(path = "/save")
public OrderDTO save(@RequestBody final OrderDTO orderDTO) {
orderDTO.setName("hello world spring cloud save order");
return orderDTO;
}
If so, Shenyu's code will invade the normal business system. Coupled to the code of the business service. If you want to change the gateway. I need to delete all the code.
Why not use conventions?
Run @requestMapping ("/order") @getMapping ("/path/{ID}/name") to obtain information about the service interface to be registered
Can you optimize? obtain information about the @RequestMapping
Can you optimize? obtain information about the @RequestMapping
I think that is a good idea by @RequestMapping or @GetMapping or @PostMapping,but how do I filter the APIs that I don't want? Without any conditional processing, all application APIs will be registered according to the @RequestMappingor @PostMapping or @GetMapping configuration.
Can you optimize? obtain information about the @RequestMapping
I think that is a good idea by
@RequestMappingor@GetMappingor@PostMapping,but how do I filter the APIs that I don't want? Without any conditional processing, all application APIs will be registered according to the@RequestMappingor@PostMappingor@GetMappingconfiguration.
Based on convention over configuration,Such as @ RequestMapping (" matching/oa / ") @ RequestMapping ("/don't match/oa/").
@65725738 How about @ShenyuRequestMapping , @ShenyuGetMapping and etc?
you can easily configurate it in http://localhost:9095/#/config/metadata like:
