Cannot resolve 'setCasServerUrlPrefix' in 'SingleSignOutFilter'

ぐ巨炮叔叔 提交于 2021-02-05 08:50:54

问题


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

The involved code is:

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

    return singleSignOutFilter;
}

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


回答1:


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.



来源:https://stackoverflow.com/questions/64354432/cannot-resolve-setcasserverurlprefix-in-singlesignoutfilter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!