springcloud micro-service, the gateway needs to carry two parameters, one is accessToken and the other is version version number, but the backend service does not need these two parameters.
for example, the back-end service is originally like this
@RestController
public class OrderController{
@RequestMapping
public void add(Order order){
...
}
}
in order to bring token and version to the request
@RestController
public class OrderController{
@RequestMapping
public void add(Order order String token, String version){
...
}
}
it doesn"t feel good to add these two parameters to every method of the back-end service. Is there any way to deal with it?