list set方法之后报错,使用add解决
https://www.cnblogs.com/xh_Blog/p/7154103.html
返回的json串是三个key,value
然后使用JsonObject jsonObject=JsonObject.parseObject(str);
jsonObject.getString('key'); 解决
String datas = restTemplate.exchange(sagUrl + RestfulConstant.AIAHKXGWF_API_GROUPS + "?groupNames=" + groups, HttpMethod.GET, entity, String.class).getBody();
AbleToProcessResponse response = ResponseUtils.responseOK(StringUtils.EMPTY);
JSONObject jsonObject = JSONObject.parseObject(datas);
String jsonGroups = jsonObject.getString("groups");
String roles = jsonObject.getString("roles");
List<RoleProperties> roleProperties = JSONObject.parseArray(roles, RoleProperties.class);
List<GroupProperties> groupProperties = JSONObject.parseArray(jsonGroups, GroupProperties.class);
List<UserProperties> userPropertiesList = new ArrayList<>(1);
response.setUserPropertiesList(userPropertiesList);
UserProperties userProperties = new UserProperties();
response.getUserPropertiesList().add(userProperties);
userProperties.setGroups(groupProperties);
userProperties.setRoles(roleProperties);
{
"returnCode": 0,
"returnMessage": "SUCCESS",
"returnDetailedMessage": "",
"userProperties": [
{
"accountId": null,
"password": null,
"userDirId": null,
"userEmail": null,
"userName": null,
"dn": null,
"roles": [
{
"roleName": "Team_A_Role",
"roledirId": "/directory/static role provider/role/uid%3dteam_a_role",
"roleNameAlias": "Team_A_Role",
"attr": {
"teamCode": "A"
}
},
{
"roleName": "XGWF_USER_ROLE",
"roledirId": "/directory/static role provider/role/uid%3dxgwf_user_role",
"roleNameAlias": "XGWF_USER_ROLE",
"attr": {}
},
{
"roleName": "Team_M_Role",
"roledirId": "/directory/static role provider/role/uid%3dteam_m_role",
"roleNameAlias": "Team_M_Role",
"attr": {
"teamCode": "M"
}
},
{
"roleName": "Team_B_Role",
"roledirId": "/directory/static role provider/role/uid%3dteam_b_role",
"roleNameAlias": "Team_B_Role",
"attr": {
"teamCode": "B"
}
},
{
"roleName": "Team_C_Role",
"roledirId": "/directory/static role provider/role/uid%3dteam_c_role",
"roleNameAlias": "Team_C_Role",
"attr": {
"teamCode": "C"
}
},
{
"roleName": "SEND_PENDING_MEMO_ROLE",
"roledirId": "/directory/static role provider/role/uid%3dsend_pending_memo_role",
"roleNameAlias": "SEND_PENDING_MEMO_ROLE",
"attr": {
"taskName": "Send Pending memo"
}
},
{
"roleName": "XGWF_USER_ROLE",
"roledirId": "/directory/static role provider/role/uid%3dxgwf_user_role",
"roleNameAlias": "XGWF_USER_ROLE",
"attr": {}
}
],
"groups": [
{
"groupName": "TEAM_A",
"groupDN": "cn=team_a,ou=groups,o=system,o=mws",
"groupDirId": "/directory/system/group/cn%3dteam_a%2cou%3dgroups%2co%3dsystem%2co%3dmws"
},
{
"groupName": "TEAM_M",
"groupDN": "cn=team_m,ou=groups,o=system,o=mws",
"groupDirId": "/directory/system/group/cn%3dteam_m%2cou%3dgroups%2co%3dsystem%2co%3dmws"
}
]
}
]
}
(although at least one Creator exists): no String-argume
接收參數錯誤
Microsoft Azure Storage Explorer
# [Mybatis 分页:Pagehelper + 拦截器实现](https://www.cnblogs.com/vandusty/p/12872978.html)
[https://www.cnblogs.com/vandusty/archive/2020/05/12/12872978.html](https://www.cnblogs.com/vandusty/archive/2020/05/12/12872978.html)
网友评论