shiro配置中添加单点登录登出过滤器后启动报错 -- 知识铺
之前没在shiroConfig里加public FilterRegistrationBean singleSignOutFilter() ;可以实现单点登录,登出有问题,家里这个方法后,启动报错: java.lang.IllegalArgumentException: casServerUrlPrefix cannot be null. at org.jasig.cas.client.util.CommonUtils.assertNotNull(CommonUtils.java:87) at org.jasig.cas.client.session.SingleSignOutHandler.init(SingleSignOutHandler.java:130) at org.jasig.cas.client.session.SingleSignOutFilter.init(SingleSignOutFilter.java:54) ………………………………… package com.audaque.gm.config; import com.audaque.gm.modules.sys.shiro.ShiroPermsFilterFactoryBean; import com.audaque.gm.modules.sys.shiro.UserFilter; import com.audaque.gm.modules.sys.shiro.UserPermFilter; import com.audaque.gm.modules.sys.sso.CallbackFilter; import com.audaque.gm.modules.sys.sso.CasRealm; import com.audaque.gm.support.shiro.listener.UserSessionListener; import com.audaque.gm.support.shiro.session.UserSessionDAO; import com.audaque.gm.support.shiro.session.UserSessionFactory; import io.buji.pac4j.filter.LogoutFilter; import io.buji.pac4j.filter.SecurityFilter; import io.buji.pac4j.subject.Pac4jSubjectFactory; import org.apache.shiro.mgt.SecurityManager; import org.apache.shiro.session.SessionListener; import org.apache.shiro.session.mgt.SessionManager; import org.apache.shiro.session.mgt.eis.MemorySessionDAO; import org.apache.shiro.session.mgt.eis.SessionDAO; import org.apache.shiro.spring.LifecycleBeanPostProcessor; import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor; import org.apache.shiro.spring.web.ShiroFilterFactoryBean; import org.apache.shiro.web.mgt.DefaultWebSecurityManager; import org.apache.shiro.web.servlet.SimpleCookie; import org.apache.shiro.web.session.mgt.DefaultWebSessionManager; import org.jasig.cas.client.session.SingleSignOutFilter; import org.jasig.cas.client.session.SingleSignOutHttpSessionListener; import org.pac4j.core.config.Config; import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.ServletListenerRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.DependsOn; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import org.springframework.web.filter.DelegatingFilterProxy;……