解决getSubject is supported only if a security manager is allowed

使用JDK23后报错getSubject is supported only if a security manager is allowed,解决方法:

启动java时添加参数-Djava.security.manager=allow 

官方文档说明:

Migrating from the Deprecated-for-Removal Methods Subject::getSubject and Subject::doAs to Subject::current and Subject::callAs

你可能感兴趣的:(解决getSubject is supported only if a security manager is allowed)