使用了spring security之后,网页的显示速度明显变慢,看来spring security的使用还是需要优化配置的。
在web.xml中配置
<!-- 配置spring acegi 使用的 和com.work.core.QxglConstants.USE_ACEGI=true 配合使用
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>
org.springframework.web.filter.DelegatingFilterProxy
</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<listener-class>
org.springframework.security.ui.session.HttpSessionEventPublisher
</listener-class>
</listener>
-->
然后配置applicationContext-spring-security-2.0.2.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">
<authentication-manager alias="authenticationManager" />
<beans:bean id="accessDecisionManager"
class="org.springframework.security.vote.AffirmativeBased">
<beans:property name="allowIfAllAbstainDecisions" value="false" /><!-- allowIfAllAbstainDecisions : 设定是否允许:“没人反对就通过”的投票策略 -->
<beans:property name="decisionVoters"><!-- 定义投票者 -->
<beans:list>
<beans:bean class="org.springframework.security.vote.RoleVoter" />
<beans:bean class="org.springframework.security.vote.AuthenticatedVoter" />
</beans:list>
</beans:property>
</beans:bean>
<beans:bean id="filterInvocationInterceptor"
class="org.springframework.security.intercept.web.FilterSecurityInterceptor">
<!-- 配置上之后secureResourceFilter 没有被执行!不知道其他朋友们有没有碰到这个问题。如果也碰到了,请问您是如何解决的?-->
<beans:property name="a
使用了spring security之后,网页的显示速度明显变慢,看来spring security的使用还是需要优化配置的。 ...
最新推荐文章于 2025-06-24 08:35:02 发布