Skip to content

定时任务调用 SysBaseApiImpl.addLog 记录日志报错 #1472

Closed
@ChangYunQing

Description

@ChangYunQing
版本号:

2.2.1

问题描述:

定时任务调用 SysBaseApiImpl.addLog() 方法报错。

(LoginUser)SecurityUtils.getSubject().getPrincipal() 这一步

org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration.
(原因是定时任务获取不到SecurityManager,建议try catch或者根据参数做判断)

截图&代码:

42CE9353-727D-4fa1-A21A-F5D77AF34B78

友情提示: 未按格式要求发帖,会直接删掉。

Activity

1298191366

1298191366 commented on Jul 24, 2020

@1298191366
Contributor

已修改,下版本发布

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zhangdaiscott@1298191366@ChangYunQing

        Issue actions

          定时任务调用 SysBaseApiImpl.addLog 记录日志报错 · Issue #1472 · jeecgboot/JeecgBoot