From da1df4fddb79dc081d2a6fef2c8dda08b06e09cf Mon Sep 17 00:00:00 2001 From: xiongxiaoyang <773861846@qq.com> Date: Sun, 15 May 2022 09:26:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20JSON=20=E6=95=B0=E5=AD=97=E8=BD=AC?= =?UTF-8?q?=E4=B8=BA=20String=20=E7=B1=BB=E5=9E=8B=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index acbbc1a..f49b686 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,9 +1,19 @@ spring: profiles: active: dev + +# 将所有数字转为 String 类型返回,避免前端数据精度丢失的问题 + jackson: + generator: + write-numbers-as-strings: true + server: port: 8888 + + + + --- spring: datasource: