Java WebCLient delete方法不删除数据,但给出200 Ok代码,以及数据已删除的消息
我已经在CF中开发了spring boot应用程序 我想使用WebClient删除其他服务“B”中的一些数据 我创建令牌(使用来自服务B的auth server的OAuth2Password),然后使用以下代码:Java WebCLient delete方法不删除数据,但给出200 Ok代码,以及数据已删除的消息,java,spring,spring-boot,cloud,webclient,Java,Spring,Spring Boot,Cloud,Webclient,我已经在CF中开发了spring boot应用程序 我想使用WebClient删除其他服务“B”中的一些数据 我创建令牌(使用来自服务B的auth server的OAuth2Password),然后使用以下代码: ResponseEntity<DelClass> webClientResponse = null; webClientResponse = webClient .delete()
ResponseEntity<DelClass> webClientResponse = null;
webClientResponse = webClient
.delete()
.uri(dataDeletionUrl)
.header("Authorization", "Bearer " + accessToken)
.retrieve()
.toEntity(DelClass.class)
.block();
ResponseEntity WebClient响应=null;
webClient响应=webClient
1.删除()
.uri(数据删除URL)
.header(“授权”、“承载人”+访问令牌)
.retrieve()
.toEntity(DelClass.class)
.block();
在这之后,我得到了200 OK的响应,消息是“数据已成功删除”
但当我在服务B中看到时,数据并没有被删除
你知道背后的原因吗
致以最良好的祝愿,
斯蒂芬