添加注释的时候. 展示发现报错
Provided id is null
查看源码发现 底层 设置用户用上了
String userId = Authentication.getAuthenticatedUserId();
因为之前没有设置, 就报错userId为空了
故 解决思路, 在添加附件,添加注释/设置assignee owner 参与者 ,或者移除参与者 操作之前调用如下
Authentication.setAuthenticatedUserId("kermit");
或者调用 (建议)
identityService.setAuthenticatedUserId("kermit");
本文介绍了一个常见的编程问题:在尝试添加注释时遇到提供的userId为空的错误。文章详细解释了为何会出现该错误,并提供了解决方案,即在进行相关操作前通过Authentication或identityService设置已验证的用户ID。
2684

被折叠的 条评论
为什么被折叠?



