代码格式化
This commit is contained in:
parent
5375e58ea2
commit
19e690bf8d
|
@ -1,32 +1,32 @@
|
|||
<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
|
||||
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.xsd
|
||||
http://www.springframework.org/schema/security
|
||||
http://www.springframework.org/schema/security/spring-security.xsd">
|
||||
|
||||
<!-- 不需要控制权限的资源 -->
|
||||
<http pattern="/resources/**" security="none" />
|
||||
<!-- 不需要控制权限的资源 -->
|
||||
<http pattern="/resources/**" security="none"/>
|
||||
|
||||
<http use-expressions="false">
|
||||
<!-- 登录页面不需要控制权限 -->
|
||||
<intercept-url pattern="/manage/login" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
|
||||
<!-- 访问其他所有页面都需要有USER权限 -->
|
||||
<intercept-url pattern="/manage/**" access="ROLE_ADMIN" />
|
||||
<!-- 登录功能 -->
|
||||
<form-login login-page="/manage/login" authentication-failure-url="/manage/login?error"/>
|
||||
<!-- 登出功能 -->
|
||||
<logout />
|
||||
</http>
|
||||
<http use-expressions="false">
|
||||
<!-- 登录页面不需要控制权限 -->
|
||||
<intercept-url pattern="/manage/login" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
|
||||
<!-- 访问其他所有页面都需要有USER权限 -->
|
||||
<intercept-url pattern="/manage/**" access="ROLE_ADMIN"/>
|
||||
<!-- 登录功能 -->
|
||||
<form-login login-page="/manage/login" authentication-failure-url="/manage/login?error"/>
|
||||
<!-- 登出功能 -->
|
||||
<logout/>
|
||||
</http>
|
||||
|
||||
<authentication-manager>
|
||||
<authentication-provider>
|
||||
<user-service>
|
||||
<!-- 这里创建两个用户,可以通过用户名密码登录 -->
|
||||
<user name="admin" password="123456" authorities="ROLE_ADMIN" />
|
||||
</user-service>
|
||||
</authentication-provider>
|
||||
</authentication-manager>
|
||||
<authentication-manager>
|
||||
<authentication-provider>
|
||||
<user-service>
|
||||
<!-- 这里创建两个用户,可以通过用户名密码登录 -->
|
||||
<user name="admin" password="123456" authorities="ROLE_ADMIN"/>
|
||||
</user-service>
|
||||
</authentication-provider>
|
||||
</authentication-manager>
|
||||
|
||||
</beans:beans>
|
|
@ -27,7 +27,7 @@
|
|||
/webjars/** = anon
|
||||
/resources/** = anon
|
||||
/sso/** = anon
|
||||
/403 = anon
|
||||
/403 = anon
|
||||
/druid/**=authc
|
||||
/manage/**=authc
|
||||
</value>
|
||||
|
@ -44,7 +44,8 @@
|
|||
<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>
|
||||
|
||||
<!-- @RequiresPermissions注解支持 -->
|
||||
<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" depends-on="lifecycleBeanPostProcessor"/>
|
||||
<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"
|
||||
depends-on="lifecycleBeanPostProcessor"/>
|
||||
<bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
|
||||
<property name="securityManager" ref="securityManager"/>
|
||||
</bean>
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="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-3.0.xsd">
|
||||
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-3.0.xsd">
|
||||
|
||||
<!-- 线程池配置 -->
|
||||
<bean id="threadPoolTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
|
||||
<!-- 线程池维护线程的最少数量 -->
|
||||
<property name="corePoolSize" value="50" />
|
||||
<!-- 线程池维护线程的最大数量,默认为Integer.MAX_VALUE -->
|
||||
<property name="maxPoolSize" value="1000" />
|
||||
<!-- 线程池所使用的缓冲队列,一般需要设置值>=notifyScheduledMainExecutor.maxNum;默认为Integer.MAX_VALUE -->
|
||||
<property name="queueCapacity" value="20000" />
|
||||
<!-- 线程池维护线程所允许的空闲时间,默认为60s -->
|
||||
<property name="keepAliveSeconds" value="300" />
|
||||
<!-- 线程池对拒绝任务(无线程可用)的处理策略,目前只支持AbortPolicy、CallerRunsPolicy;默认为后者 -->
|
||||
<property name="rejectedExecutionHandler">
|
||||
<!-- AbortPolicy:直接抛出java.util.concurrent.RejectedExecutionException异常 -->
|
||||
<!-- CallerRunsPolicy:主线程直接执行该任务,执行完之后尝试添加下一个任务到线程池中,可以有效降低向线程池内添加任务的速度 -->
|
||||
<!-- DiscardOldestPolicy:抛弃旧的任务、暂不支持;会导致被丢弃的任务无法再次被执行 -->
|
||||
<!-- DiscardPolicy:抛弃当前任务、暂不支持;会导致被丢弃的任务无法再次被执行 -->
|
||||
<bean class="java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy" />
|
||||
</property>
|
||||
</bean>
|
||||
<!-- 线程池配置 -->
|
||||
<bean id="threadPoolTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
|
||||
<!-- 线程池维护线程的最少数量 -->
|
||||
<property name="corePoolSize" value="50"/>
|
||||
<!-- 线程池维护线程的最大数量,默认为Integer.MAX_VALUE -->
|
||||
<property name="maxPoolSize" value="1000"/>
|
||||
<!-- 线程池所使用的缓冲队列,一般需要设置值>=notifyScheduledMainExecutor.maxNum;默认为Integer.MAX_VALUE -->
|
||||
<property name="queueCapacity" value="20000"/>
|
||||
<!-- 线程池维护线程所允许的空闲时间,默认为60s -->
|
||||
<property name="keepAliveSeconds" value="300"/>
|
||||
<!-- 线程池对拒绝任务(无线程可用)的处理策略,目前只支持AbortPolicy、CallerRunsPolicy;默认为后者 -->
|
||||
<property name="rejectedExecutionHandler">
|
||||
<!-- AbortPolicy:直接抛出java.util.concurrent.RejectedExecutionException异常 -->
|
||||
<!-- CallerRunsPolicy:主线程直接执行该任务,执行完之后尝试添加下一个任务到线程池中,可以有效降低向线程池内添加任务的速度 -->
|
||||
<!-- DiscardOldestPolicy:抛弃旧的任务、暂不支持;会导致被丢弃的任务无法再次被执行 -->
|
||||
<!-- DiscardPolicy:抛弃当前任务、暂不支持;会导致被丢弃的任务无法再次被执行 -->
|
||||
<bean class="java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="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-3.0.xsd">
|
||||
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-3.0.xsd">
|
||||
|
||||
<!-- 启动解压zhengAdmin-x.x.x.jar到resources目录 -->
|
||||
<bean id="zhengAdminUtil" class="com.zheng.common.util.ZhengAdminUtil"></bean>
|
||||
<!-- 启动解压zhengAdmin-x.x.x.jar到resources目录 -->
|
||||
<bean id="zhengAdminUtil" class="com.zheng.common.util.ZhengAdminUtil"></bean>
|
||||
|
||||
</beans>
|
|
@ -1,23 +1,23 @@
|
|||
<?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:mvc="http://www.springframework.org/schema/mvc"
|
||||
xsi:schemaLocation="
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||
|
||||
<!-- 根目录'/'对应页面 -->
|
||||
<mvc:view-controller path="/" view-name="/index"/>
|
||||
<!-- 根目录'/'对应页面 -->
|
||||
<mvc:view-controller path="/" view-name="/index"/>
|
||||
|
||||
<!-- 拦截器 -->
|
||||
<mvc:interceptors>
|
||||
<!-- 获取登录信息 -->
|
||||
<mvc:interceptor>
|
||||
<mvc:mapping path="/manage/**" />
|
||||
<bean class="com.zheng.upms.server.interceptor.UpmsLoginInterceptor"></bean>
|
||||
</mvc:interceptor>
|
||||
</mvc:interceptors>
|
||||
<!-- 拦截器 -->
|
||||
<mvc:interceptors>
|
||||
<!-- 获取登录信息 -->
|
||||
<mvc:interceptor>
|
||||
<mvc:mapping path="/manage/**"/>
|
||||
<bean class="com.zheng.upms.server.interceptor.UpmsLoginInterceptor"></bean>
|
||||
</mvc:interceptor>
|
||||
</mvc:interceptors>
|
||||
|
||||
</beans>
|
Loading…
Reference in New Issue