-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用JsonField配置日期格式,被FastJsonConfig的全局配置覆盖掉 #1868
Comments
@zxk175 感觉这样有点取巧 |
@zxk175 这样操作,全局的配置无法生效,直接给返回long类型。还要每个去配置,贼麻烦。 |
我也遇到这个问题了。format值传进去了,但是写死了,优先使用全局设置的dateFormat。很蛋疼。 |
这个问题应该改吧,正常来说都是从小到大生效的配置 |
问题解决了吗,感觉很久了啊,现在版本还是有 |
This was referenced Aug 29, 2019
Omega-Ariston
added a commit
to Omega-Ariston/fastjson
that referenced
this issue
Sep 4, 2019
Omega-Ariston
added a commit
to Omega-Ariston/fastjson
that referenced
this issue
Sep 5, 2019
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1、继承WebMvcConfigurerAdapter后,配置了全局的时间转换格式
2、使用JSONField指定dto转换时间格式
3、最后的转换结果,时间格式为yyyy-MM-dd HH:mm:ss,并不是jsonField的yyyy-MM-dd格式。
4、debug后得到问题在于JSONSerializer类:
此处的逻辑判断,应该是先判断参数format是否被配置了时间格式,再判断全局时间格式。
The text was updated successfully, but these errors were encountered: