I have a feign client that uses a dto to perform the request using @RequestBody. The problem is that some property does not match with the java standards, for example id_client. Is there a way to change the variable name and keep it working with the feign ?
Below there is the code of the feign client the dto used in the request body.
@FeignClient(name="sso-token", url = "http://keycloak.com.br:8180", path="/")
public interface SsoTokenQueryWebAdapter {
@PostMapping(value = "/auth/realms/real-refrigerantes/protocol/openid-connect/token", consumes = "application/x-www-form-urlencoded")
public String recuperarToken(@RequestBody RequestTokenDto dto);
}
@Data
public class RequestTokenDto {
private String username;
private String password;
private String client_id;
private String client_secret;
private String grant_type;
}