What should I do if the parameters required by the gateway in the springcloud micro-service are not needed by the back-end service?

In

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?


I don't know when these two parameters are used
if you want to use RestTemplate, you can use the interceptor to add the parameter


Thank you for inviting me. I don't know much about spring-cloud

if the dubbo project is put into the configuration file and managed in XML, I wonder if you can refer to

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e493bd-44071.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e493bd-44071.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?