前端通过平台接口为参数绑定对象,后端收到打印出来的确实这样一个奇怪的字符串
-
直接用Map接收平台会打印报错这个是字符串:
Field error in object 'TESTDTO' on field 'params3': rejected value [map[aaa:111 bbb:111]]; codes [typeMismatch.TESTDTO.params3,typeMismatch.params3,typeMismatch.java.util.Map,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [TESTDTO.params3,params3]; arguments []; default message [params3]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.util.Map' for property 'params3'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'java.util.Map' for property 'params3': no matching editors or conversion strategy found] -
@admin 是这样的
time=2024-12-17T16:22:37.247+08:00 level=DEBUG msg="请求: test 请求: {Method:GET Url:http://traefik:80/duty/detection/TEST Timeout:0 Params:map[params1:111 params2:111 params3:map[aaa:111 bbb:111]] Headers:map[] Auth:<nil> Body:<nil>}" logType=syslog service=data-source module=调用接口 projectId=6551b5b259e0436a84d557fc