Spring Security 本身并不提供获取 ThreadGroup 的方法。要获取当前线程的 ThreadGroup,可以使用以下代码:

ThreadGroup threadGroup = Thread.currentThread().getThreadGroup();

该代码使用 Thread.currentThread() 方法获取当前线程,然后调用 getThreadGroup() 方法获取该线程所属的 ThreadGroup。

Spring Security 中获取 ThreadGroup 的方法

原文地址: https://www.cveoy.top/t/topic/ottg 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录