You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "JiangZhou1 (via GitHub)" <gi...@apache.org> on 2023/09/12 03:56:38 UTC

[GitHub] [dubbo] JiangZhou1 opened a new issue, #13046: 使用了dubbo spring boot starter 3.2.5之后,Spring boot默认json序列化工具被设为了fastjson,请问改如何修改

JiangZhou1 opened a new issue, #13046:
URL: https://github.com/apache/dubbo/issues/13046

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ## Ask your question here
   使用了dubbo spring boot starter 3.2.5之后,Spring boot默认json序列化工具被设为了fastjson,我现在想将json序列化工具修改回Jackson,但我并没有找到相关配置,请问改如何修改
   spirng boot 版本:2.6.4
   dubbo spring boot starter: 3.2.5
   fastjson: 2.0.40


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] JiangZhou1 commented on issue #13046: 使用了dubbo spring boot starter 3.2.5之后,Spring boot默认json序列化工具被设为了fastjson,请问改如何修改

Posted by "JiangZhou1 (via GitHub)" <gi...@apache.org>.
JiangZhou1 commented on issue #13046:
URL: https://github.com/apache/dubbo/issues/13046#issuecomment-1718926949

   谢谢各位,我已经找到原因,由于类的泛型层级过深,在方法的返回类型上没有给出完整的泛型类型,类似这样:A<B<C>>,我是这样的A<>,在传递过程中C这一层变成了HashMap格式,也就丢失了@JsonFormat注解。在dubbo 3.2.0和之前的版本是没有这个问题的,可能是因为使用的是hessian2,而fastjson2并没有处理那么深的层级。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] aomsir commented on issue #13046: 使用了dubbo spring boot starter 3.2.5之后,Spring boot默认json序列化工具被设为了fastjson,请问改如何修改

Posted by "aomsir (via GitHub)" <gi...@apache.org>.
aomsir commented on issue #13046:
URL: https://github.com/apache/dubbo/issues/13046#issuecomment-1714947313

   dubbo在3.2.x后将默认序列化由hessian2替换为了Fastjson2
   你可以引入依赖,在dubbo配置文件中进行修改即可
   
   
   https://blog.csdn.net/qq_43266723/article/details/132794546


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] JiangZhou1 closed issue #13046: 使用了dubbo spring boot starter 3.2.5之后,Spring boot默认json序列化工具被设为了fastjson,请问改如何修改

Posted by "JiangZhou1 (via GitHub)" <gi...@apache.org>.
JiangZhou1 closed issue #13046: 使用了dubbo spring boot starter 3.2.5之后,Spring boot默认json序列化工具被设为了fastjson,请问改如何修改
URL: https://github.com/apache/dubbo/issues/13046


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #13046: 使用了dubbo spring boot starter 3.2.5之后,Spring boot默认json序列化工具被设为了fastjson,请问改如何修改

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13046:
URL: https://github.com/apache/dubbo/issues/13046#issuecomment-1716814550

   > > dubbo在3.2.x后将默认序列化由hessian2替换为了Fastjson2 你可以引入依赖,在dubbo配置文件中进行修改即可
   > > https://blog.csdn.net/qq_43266723/article/details/132794546
   > 
   > 我使用3.2.0的版本是正常的,我也去看了一下启动日志里边包含fastjson2,并且@JsonFormat注解可以正常起作用,但是当我把版本替换到3.2.0之后的任一个版本,@JsonFormat注解就失效了。
   
   `@JsonFormat` 是加在 Spring Controller 的参数里面还是 Dubbo 请求的参数里面


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] JiangZhou1 commented on issue #13046: 使用了dubbo spring boot starter 3.2.5之后,Spring boot默认json序列化工具被设为了fastjson,请问改如何修改

Posted by "JiangZhou1 (via GitHub)" <gi...@apache.org>.
JiangZhou1 commented on issue #13046:
URL: https://github.com/apache/dubbo/issues/13046#issuecomment-1715038163

   > dubbo在3.2.x后将默认序列化由hessian2替换为了Fastjson2 你可以引入依赖,在dubbo配置文件中进行修改即可
   > 
   > https://blog.csdn.net/qq_43266723/article/details/132794546
   
   我使用3.2.0的版本是正常的,我也去看了一下启动日志里边包含fastjson2,并且@JsonFormat注解可以正常起作用,但是当我把版本替换到3.2.0之后的任一个版本,@JsonFormat注解就失效了。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org