From f28c8a9c1617c464446bd11aa0ffdecb19eee323 Mon Sep 17 00:00:00 2001 From: xiongxiaoyang <1179705413@qq.com> Date: Tue, 18 Apr 2023 11:34:26 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20=E6=81=A2=E5=A4=8D=E8=AF=AF=E5=88=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 作家专区稿费收入报错 --- .../java2nb/novel/core/config/WebMvcConfig.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 novel-front/src/main/java/com/java2nb/novel/core/config/WebMvcConfig.java diff --git a/novel-front/src/main/java/com/java2nb/novel/core/config/WebMvcConfig.java b/novel-front/src/main/java/com/java2nb/novel/core/config/WebMvcConfig.java new file mode 100644 index 0000000..c535b6d --- /dev/null +++ b/novel-front/src/main/java/com/java2nb/novel/core/config/WebMvcConfig.java @@ -0,0 +1,17 @@ +package com.java2nb.novel.core.config; + +import com.java2nb.novel.core.converter.DateConverter; +import org.springframework.context.annotation.Configuration; +import org.springframework.format.FormatterRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; + +/** + * @author xiongxiaoyang + */ +@Configuration +public class WebMvcConfig extends WebMvcConfigurerAdapter { + @Override + public void addFormatters(FormatterRegistry registry) { + registry.addConverter(new DateConverter()); + } +}