Examination_system/Examination_system-1/.svn/pristine/64/64f132a861ad005cce72673a55d...

89 lines
3.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd"
default-lazy-init="true">
<description>Shiro Configuration</description>
<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<property name="realm" ref="ShiroRealm" />
</bean>
<!-- 項目自定义的Realm -->
<bean id="ShiroRealm" class="com.bonus.sys.ShiroRealm"></bean>
<!-- Shiro Filter -->
<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager" />
<property name="loginUrl" value="/loginIndex" />
<property name="successUrl" value="/backstage/index" />
<property name="unauthorizedUrl" value="/loginIndex" />
<!-- anon:匿名拦截器,即不需要登录即可访问;一般用于静态资源过滤 authc:如果没有登录会跳到相应的登录页面登录 user:用户拦截器,用户已经身份验证/记住我登录的都可 -->
<property name="filterChainDefinitions">
<value>
/backstage/grade/** = anon
/backstage/registration/** = anon
/Subscribe/** = anon
/backstage/camera/** = anon
/backstage/weixinLogin/** = anon
/webPortal/show/** = anon
/backstage/repair/task/** = anon
/backstage/testDetails/** = anon
/backstage/newProject/** = anon
/backstage/backManage/** = anon
/backstage/purchaseManage/** = anon
/exam/**=anon
/backstage/user/** = anon
/backstage/reservoir/** = anon
/backstage/royaltyDetails/** = anon
/backstage/epc/** = anon
/backstage/dataAnalyze/** = anon
/backstage/wechat/** = anon
/backstage/machine/** = anon
/backstage/machineType/** = anon
/backstage/partstype/** = anon
/backstage/partcoller/** = anon
/backstage/rfidlabel/** = anon
/backstage/company/** = anon
/backstage/project/** = anon
/backstage/lease/** = anon
/backstage/qrcode/** = anon
/backstage/vender/** = anon
/images/** = anon
/maTypeFile/** = anon
/static/build/generic/web/** = anon
/static/js/login/** = anon
/static/js/system/** = authc
/static/** = anon
/favicon.ico = anon
/verifyCode/** = anon
/system_login = anon
/exterInt/** = anon
/weixin/** = anon
/upgrade/** = anon
/upload/** = anon
/WEB-INF/views/** = anon
/backstage/client/** = anon
/** = authc
</value>
</property>
</bean>
<!-- AOP式方法级权限检查 -->
<!-- <bean
class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"
depends-on="lifecycleBeanPostProcessor">
<property name="proxyTargetClass" value="true" />
</bean> -->
<!-- 保证实现了Shiro内部lifecycle函数的bean执行 -->
<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor" />
</beans>