首页 > 代码库 > 配置文件-shiro-context.xml

配置文件-shiro-context.xml

<beans   >

<bean id="securityManager" class="org...DefaultWebSecurityManager">

           <property name="realm" ref="shiroRealm"/>
           <property name="cacheManager" ref="cacheManager"/>
</bean>
<bean id="shiroFilter" class="org..ShiroFilterFactoryBean">
          <property name="securityManager" ref="securityManager"/>
          <property name="loginUrl" ref="/web/auth/login"/>
          <property name="successUrl" ref="/"/>
         <property name="unauthorizedUrl" ref="/"/>
         <property name="filter">
               <map>
                        <entry key="authc" value-ref="formAuthFilter"/>
             </map>
        </property>
        <property name="filterChainDefinitions">
              <value>
                      /services/**=anno
                     /web/auth/**=anno
                     /web/css/**=anno
                    /web/js/**=anno
                   /web/**=authc
           </value>
      </property>
</bean>
<bean id="cacheManager" class="org..MemoryConstrainedCacheManager"/>
<bean id="shiroRealm" class="com.etruck.portal.auth.ShiroRealm"/>
<bean id="lifecycleBeanPostProcessor" class="org..LifecycleBeanPostProcessor"/>
<bean id="formAuthFilter" class="com.etruck.portal.auth.FormAuthFilter"/>
<bean class="org..DefaultAdvisorAutoProxyCreator" depends-on="lifecycleBeanPostProcessor"/>
<bean class="org..AuthorizationAttributeSourceAdvisor">
        <property name="securityManager" ref="securityManager"/>
</bean>
</beans>

配置文件-shiro-context.xml