无法解析"SingleSignOutFilter"中的"setCasServerUrlPrefix" [英] Cannot resolve 'setCasServerUrlPrefix' in 'SingleSignOutFilter'

查看:183
本文介绍了无法解析"SingleSignOutFilter"中的"setCasServerUrlPrefix"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在最近升级依赖CAS进行身份验证的Spring Boot应用程序之后,由于在 SingleSignOutFilter :

After a recent upgrade of a Spring Boot application that relies on CAS for authentication, the project no longer compiles due to the fact that the setCasServerUrlPrefix method can't be found on SingleSignOutFilter:

java: cannot find symbol
  symbol:   method setCasServerUrlPrefix(java.lang.String)
  location: variable singleSignOutFilter of type org.jasig.cas.client.session.SingleSignOutFilter

涉及的代码是:

@Bean
public SingleSignOutFilter singleSignOutFilter() {
    SingleSignOutFilter singleSignOutFilter = new SingleSignOutFilter();
    singleSignOutFilter.setCasServerUrlPrefix("...");
    singleSignOutFilter.setIgnoreInitConfiguration(true);

    return singleSignOutFilter;
}

即使setter不再存在,如何更新代码以仍然设置此值?

How to update the code to still set this value even though the setter doesn't exist anymore?

推荐答案

该方法自 cas-client 3.6.0(

It looks like this method has been removed since cas-client 3.6.0 (reference commit) as it was not used internally so calling setCasServerUrlPrefix is no longer needed.

并不是真正的语义版本友好型,因为没有弃用周期,并且此更改是在点发布中引入的,但至少可以安全地从代码库中删除.

Not really semantic-version-friendly as there were no deprecation cycle and this change is introduced in a point release but at least, it is safe to remove from your code base.

这篇关于无法解析"SingleSignOutFilter"中的"setCasServerUrlPrefix"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆