fix(gateway): use BodyInserter supertype — Spring 6.2 renamed FormDataSpec to FormInserter
CodeQL Advanced / Analyze (actions) (push) Canceled after 0s
CodeQL Advanced / Analyze (java-kotlin) (push) Canceled after 0s
CodeQL Advanced / Analyze (javascript-typescript) (push) Canceled after 0s
CodeQL Advanced / Analyze (python) (push) Canceled after 0s
Docker Image Build & Push / manifest (push) Canceled after 0s
Docker Image Build & Push / build-and-push-arm (push) Canceled after 0s
Docker Image Build & Push / build-and-push-amd (push) Canceled after 0s
Gateway Docker Image CI / Build and Push Gateway Docker Image (push) Canceled after 0s

This commit is contained in:
figmar
2026-08-31 03:25:53 +08:00
parent 6cae8d4988
commit b1caabdd18
@@ -6,6 +6,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.client.reactive.ReactorClientHttpConnector; import org.springframework.http.client.reactive.ReactorClientHttpConnector;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.BodyInserter;
import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.BodyInserters;
import org.springframework.web.reactive.function.client.ClientResponse; import org.springframework.web.reactive.function.client.ClientResponse;
import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.reactive.function.client.WebClient;
@@ -104,7 +105,7 @@ public class CasdoorClient {
* 非 2xx 解析错误 JSON 并抛出带 error_description 的异常。 * 非 2xx 解析错误 JSON 并抛出带 error_description 的异常。
*/ */
private Mono<CasdoorTokenResponse> postToken( private Mono<CasdoorTokenResponse> postToken(
BodyInserters.FormDataSpec form, String op) { BodyInserter<?, ?> form, String op) {
return webClient.post() return webClient.post()
.uri(props.getTokenUri()) .uri(props.getTokenUri())
.contentType(MediaType.APPLICATION_FORM_URLENCODED) .contentType(MediaType.APPLICATION_FORM_URLENCODED)