我是用的sdk版本是:
cn.authing
authing-java-sdk
3.1.10
使用ManagementClient中的获取所有部门信息报错,具体的报错信息如下:
10:56:18.261 [main] INFO [Authing] - 请求 url: https://core.authing.cn/api/v3/get-all-departments?organizationCode=3iNoaiR4EVA40OAVDs1yGeftn70Zoz
10:56:18.967 [main] INFO [Authing] - 响应:{“statusCode”:200,“message”:"",“data”:{“list”:[{“departmentId”:“6740383af20f2d3401a86994”,“createdAt”:“2024-11-22T07:52:26.270Z”,“updatedAt”:“2024-11-22T07:52:26.270Z”,“openDepartmentId”:null,“name”:“测试1”,“description”:null,“code”:“3iNoaiR4EVA40OAVDs1yGeftn70Zoz”,“isVirtualNode”:false,“i18n”:{“name”:{“zh-CN”:{“enabled”:false,“value”:""},“en-US”:{“enabled”:false,“value”:""}}},“customData”:{},“posts”:[{“id”:“67404b98eb616430d244ca8f”,“code”:“kaifa”,“name”:“开发”,“description”:""}],“postIdList”:[“67404b98eb616430d244ca8f”],“status”:true},{“departmentId”:“67403bdb8d79ea5dff65205b”,“createdAt”:“2024-11-22T08:07:55.565Z”,“updatedAt”:“2024-11-22T08:07:55.565Z”,“openDepartmentId”:null,“name”:“1-1”,“description”:“sss”,“parentDepartmentId”:“6740383af20f2d3401a86994”,“code”:“cc”,“parentDepartmentCode”:“3iNoaiR4EVA40OAVDs1yGeftn70Zoz”,“isVirtualNode”:false,“i18n”:{“name”:{“zh-CN”:{“enabled”:false,“value”:""},“en-US”:{“enabled”:false,“value”:""}}},“customData”:{},“posts”:[],“postIdList”:[],“status”:true},{“departmentId”:“6761372651cc0e39cd623e8f”,“createdAt”:“2024-12-17T08:32:38.778Z”,“updatedAt”:“2024-12-17T08:32:38.778Z”,“openDepartmentId”:null,“name”:“1-1-1”,“description”:"",“parentDepartmentId”:“67403bdb8d79ea5dff65205b”,“code”:null,“parentDepartmentCode”:“cc”,“isVirtualNode”:false,“i18n”:{“name”:{“zh-CN”:{“enabled”:false,“value”:""},“en-US”:{“enabled”:false,“value”:""}}},“customData”:{},“posts”:[],“postIdList”:[],“status”:true}],“totalCount”:3},“requestId”:“a81dfb390cb292b6b637fe7bb39d6dfc”}, 耗时:718 ms
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type java.util.ArrayList<java.lang.Object>
from Object value (token JsonToken.START_OBJECT
)
at [Source: (String)"{“statusCode”:200,“message”:"",“data”:{“list”:[{“departmentId”:“6740383af20f2d3401a86994”,“createdAt”:“2024-11-22T07:52:26.270Z”,“updatedAt”:“2024-11-22T07:52:26.270Z”,“openDepartmentId”:null,“name”:“测试1”,“description”:null,“code”:“3iNoaiR4EVA40OAVDs1yGeftn70Zoz”,“isVirtualNode”:false,“i18n”:{“name”:{“zh-CN”:{“enabled”:false,“value”:""},“en-US”:{“enabled”:false,“value”:""}}},“customData”:{},“posts”:[{“id”:“67404b98eb616430d244ca8f”,“code”:“kaifa”,“name”:“开发”,“description”:""}],“postIdList”:[“674”[truncated 1006 chars]; line: 1, column: 404] (through reference chain: cn.authing.sdk.java.dto.DepartmentPaginatedRespDto[“data”]->cn.authing.sdk.java.dto.DepartmentPagingDto[“list”]->java.util.ArrayList[0]->cn.authing.sdk.java.dto.DepartmentDto[“posts”]->java.util.ArrayList[0])
at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1741)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1515)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1420)
at com.fasterxml.jackson.databind.DeserializationContext.extractScalarFromObject(DeserializationContext.java:932)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer._parseString(StdDeserializer.java:1339)
at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:216)
at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:182)
at com.fasterxml.jackson.databind.deser.std.StringCollectionDeserializer.deserialize(StringCollectionDeserializer.java:25)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3629)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3597)
at cn.authing.sdk.java.util.JsonUtils.deserialize(JsonUtils.java:30)
at cn.authing.sdk.java.client.BaseClient.deserialize(BaseClient.java:20)
at cn.authing.sdk.java.client.ManagementClient.getAllDepartments(ManagementClient.java:1184)