Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 用cas实现Spring交换机用户过滤器_Java_Spring Security_Cas - Fatal编程技术网

Java 用cas实现Spring交换机用户过滤器

Java 用cas实现Spring交换机用户过滤器,java,spring-security,cas,Java,Spring Security,Cas,我是Spring security和cas的新手。 在我的项目中,我有一个cas(CenterAlaAuthenticationServer)服务器和一个服务服务器。 我想为我的应用程序中的一些用户实现交换机用户过滤器。 我应该把这些线放在哪里 <bean id="switchUserProcessingFilter" class="org.springframework.security.web.authentication.switchuser.SwitchUserFilter">

我是Spring security和cas的新手。 在我的项目中,我有一个cas(CenterAlaAuthenticationServer)服务器和一个服务服务器。 我想为我的应用程序中的一些用户实现交换机用户过滤器。 我应该把这些线放在哪里

<bean id="switchUserProcessingFilter" class="org.springframework.security.web.authentication.switchuser.SwitchUserFilter">
 <property name="userDetailsService" ref="userDetailsService" />
 <property name="switchUserUrl" value="/j_spring_security_switch_user" />
 <property name="exitUserUrl" value="/j_spring_security_exit_user" />
 <property name="targetUrl" value="/index.jsp" />
</bean>

在我的cas项目中还是在我的web应用程序中? 我应该告诉tomcat在web.xml中使用这个过滤器吗? 是否有任何实现示例?
我应该创建java类来实现这个fitler吗?

将它添加到web应用程序(dispatcherservlet.xml)中。如果需要,请检查此示例。

回答中的一些示例代码会很好。链接可能会过时