From 31bd2c0bf80151c794f73f27a772240acf67b580 Mon Sep 17 00:00:00 2001
From: xiongxiaoyang <1179705413@qq.com>
Date: Wed, 21 Sep 2022 15:05:29 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=9B=E5=85=A5?=
=?UTF-8?q?=E4=BD=9C=E5=AE=B6=E4=B8=93=E5=8C=BA=E6=8F=90=E7=A4=BA=E8=AE=BF?=
=?UTF-8?q?=E9=97=AE=E6=9C=AA=E6=8E=88=E6=9D=83=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
原因:Spring Boot 3.0.0 在第 4 个 M(里程碑)版本中增加了
ElasticsearchClientConfigurations 配置类,该类改变了 Spring Boot Jackson
的默认配置,导致所有 null 属性都没有返回。
解决方案:将 Spring Boot 的版本修改为 M3 ,因为
SNAPSHOT(快照)版本一直在更新,后面可能会出现类似的问题,暂时不使用 Spring Boot 的 SNAPSHOT 版本,等 GA
版本发布后,再统一升级。
---
pom.xml | 35 +++++++++---------------------
src/main/resources/application.yml | 11 +++++-----
2 files changed, 15 insertions(+), 31 deletions(-)
diff --git a/pom.xml b/pom.xml
index 42428ef..6a006f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,8 +6,7 @@
org.springframework.boot
spring-boot-starter-parent
- 3.0.0-SNAPSHOT
-
+ 3.0.0-M3
io.github.xxyopen
novel
@@ -17,7 +16,6 @@
17
3.5.1
- 6.0.0-SNAPSHOT
0.11.5
8.2.0
2.3.1
@@ -235,20 +233,15 @@
- spring-milestones
- Spring Milestones
- https://repo.spring.io/milestone
+ spring-snapshots
+ https://repo.spring.io/snapshot
- false
+ true
- spring-snapshots
- Spring Snapshots
- https://repo.spring.io/snapshot
-
- false
-
+ spring-milestones
+ https://repo.spring.io/milestone
sonatype-nexus-snapshots
@@ -285,20 +278,12 @@
- spring-milestones
- Spring Milestones
- https://repo.spring.io/milestone
-
- false
-
+ spring-snapshots
+ https://repo.spring.io/snapshot
- spring-snapshots
- Spring Snapshots
- https://repo.spring.io/snapshot
-
- false
-
+ spring-milestones
+ https://repo.spring.io/milestone
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 69d9e2c..2b600ed 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -82,12 +82,11 @@ spring:
--- #---------------------中间件配置---------------------------
spring:
- data:
- # Redis 配置
- redis:
- host: 127.0.0.1
- port: 6379
- password: 123456
+ # Redis 配置
+ redis:
+ host: 127.0.0.1
+ port: 6379
+ password: 123456
# Elasticsearch 配置
elasticsearch: