![](/img/trans.png)
[英]Dont see spring-boot-starter-data-mongodb-reactive and spring-boot-starter-webflux dependency in maven
[英]Getting error UnsupportedMediaTypeException when trying to update maven dependency to spring-webflux from spring-boot-starter-webflux
當我試圖從 maven 中的spring-boot-starter-webflux更新spring-webflux依賴項時。 我的工作代碼開始給出錯誤,例如“
從:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<version>2.2.6.RELEASE</version>
</dependency>
變成:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webflux</artifactId>
<version>5.2.6.RELEASE</version>
</dependency>
低於錯誤:
org.springframework.web.reactive.function.UnsupportedMediaTypeException: Content type 'application/json' not supported for bodyType=com.location.of.Object at org.springframework.web.reactive.function.BodyInserters.unsupportedError(BodyInserters.java:391)
注意:我正在為 POJO 嘗試 Jackson 庫並在其中包含構造函數。 可能是什么問題? 如何解決?
這是因為我沒有包含在我的項目子模塊中的 Jeckson 依賴項。 我在子模塊中添加了依賴項並且它起作用了。 謝謝大家。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.