-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
737ae6c
commit a5a017c
Showing
251 changed files
with
232 additions
and
74,055 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,129 @@ | ||
<?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/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd | ||
<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/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd | ||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> | ||
|
||
<!-- 自动扫描且只扫描@Controller --> | ||
<context:component-scan base-package="com.darknight.cms,com.xqlc.webapp" | ||
use-default-filters="false"> | ||
<context:include-filter type="annotation" | ||
expression="org.springframework.stereotype.Controller" /> | ||
<context:component-scan base-package="com.darknight.platform.*,com.darknight.cms.*" use-default-filters="false"> | ||
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/> | ||
</context:component-scan> | ||
|
||
<bean id="localeResolver" | ||
class="org.springframework.web.servlet.i18n.SessionLocaleResolver" /> | ||
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"/> | ||
|
||
<mvc:interceptors> | ||
<bean class="com.xqlc.core.web.XqlcPermissionInterceptor" /> | ||
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" /> | ||
</mvc:interceptors> | ||
<!--<mvc:interceptors>--> | ||
<!--<bean class="com.xqlc.core.web.XqlcPermissionInterceptor"/>--> | ||
<!--<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/>--> | ||
<!--</mvc:interceptors>--> | ||
|
||
<mvc:annotation-driven> | ||
<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager"> | ||
<mvc:argument-resolvers> | ||
<bean class="org.springframework.data.web.PageableArgumentResolver" /> | ||
<bean class="org.springframework.data.web.PageableHandlerMethodArgumentResolver"/> | ||
</mvc:argument-resolvers> | ||
<mvc:message-converters register-defaults="true"> | ||
<bean class="com.xqlc.core.web.UTF8StringHttpMessageConverter" /> | ||
<bean class="org.springframework.http.converter.StringHttpMessageConverter"> | ||
<constructor-arg value="UTF-8" /> | ||
</bean> | ||
</mvc:message-converters> | ||
</mvc:annotation-driven> | ||
|
||
<mvc:default-servlet-handler /> | ||
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"> | ||
<property name="ignoreAcceptHeader" value="true"/> | ||
<property name="defaultContentType" value="text/html" /> | ||
<property name="mediaTypes"> | ||
<map> | ||
<entry key="html" value="text/html" /> | ||
<entry key="json" value="application/json" /> | ||
<entry key="xml" value="application/xml" /> | ||
</map> | ||
</property> | ||
</bean> | ||
|
||
<mvc:default-servlet-handler/> | ||
|
||
<!-- 访问静态资源文件 --> | ||
<mvc:resources mapping="/static/**" location="/static/" cache-period="31556926"/> | ||
|
||
<!-- 定义首页 --> | ||
<mvc:view-controller path="/" view-name="redirect:/index" /> | ||
<mvc:view-controller path="/" view-name="redirect:/indexPage"/> | ||
|
||
<!-- 定义JSP --> | ||
<bean | ||
class="org.springframework.web.servlet.view.InternalResourceViewResolver"> | ||
<property name="viewClass" | ||
value="org.springframework.web.servlet.view.JstlView" /> | ||
<property name="prefix" value="/WEB-INF/views" /> | ||
<property name="suffix" value=".jsp" /> | ||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> | ||
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> | ||
<property name="prefix" value="/WEB-INF/views/"/> | ||
<property name="suffix" value=".jsp"/> | ||
</bean> | ||
|
||
<bean id="multipartResolver" | ||
class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> | ||
<!-- 定义freemarker解析器--> | ||
<!--<bean id="freeMarkerViewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">--> | ||
<!--<property name="viewClass" value="org.springframework.web.servlet.view.freemarker.FreeMarkerView"/>--> | ||
<!--<property name="viewNames" value="*.ftl"/>--> | ||
<!--<property name="cache" value="true" />--> | ||
<!--<property name="prefix" value="" />--> | ||
<!--<property name="suffix" value="" />--> | ||
<!--<property name="contentType" value="text/html;charset=UTF-8"></property>--> | ||
<!--<property name="requestContextAttribute" value="request" />--> | ||
<!--<property name="order" value="0"/>--> | ||
<!--</bean>--> | ||
|
||
<!--<!– 模版的其他配置 –>--> | ||
<!--<bean id="freemarkerConfig"--> | ||
<!--class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">--> | ||
<!--<property name="templateLoaderPath" value="" />--> | ||
<!--<property name="freemarkerSettings">--> | ||
<!--<props>--> | ||
<!--<prop key="template_update_delay">0</prop>--> | ||
<!--<prop key="default_encoding">UTF-8</prop>--> | ||
<!--<prop key="number_format">0.##########</prop>--> | ||
<!--<prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop>--> | ||
<!--<prop key="classic_compatible">true</prop>--> | ||
<!--<prop key="template_exception_handler">ignore</prop>--> | ||
<!--</props>--> | ||
<!--</property>--> | ||
|
||
<!--<property name="freemarkerVariables">--> | ||
<!--<map>--> | ||
<!--<entry key="block" value-ref="block" />--> | ||
<!--<entry key="override" value-ref="override" />--> | ||
<!--<entry key="extends" value-ref="extends" />--> | ||
<!--</map>--> | ||
<!--</property>--> | ||
|
||
<!--</bean>--> | ||
|
||
<!--<!–freemarker 模板继承配置–>--> | ||
<!--<bean id="block" class="com.pk.freemarker.BlockDirective" />--> | ||
<!--<bean id="override" class="com.pk.freemarker.OverrideDirective" />--> | ||
<!--<bean id="extends" class="com.pk.freemarker.ExtendsDirective" />--> | ||
|
||
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> | ||
<!-- 设置上传文件的最大尺寸为10MB --> | ||
<property name="maxUploadSize"> | ||
<value>104857600</value> | ||
</property> | ||
</bean> | ||
|
||
<!-- 支持 Shiro对Controller的方法级AOP安全控制 begin --> | ||
<bean | ||
class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" | ||
depends-on="lifecycleBeanPostProcessor"> | ||
<property name="proxyTargetClass" value="true" /> | ||
</bean> | ||
<!--<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"--> | ||
<!--depends-on="lifecycleBeanPostProcessor">--> | ||
<!--<property name="proxyTargetClass" value="true"/>--> | ||
<!--</bean>--> | ||
|
||
<bean | ||
class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor"> | ||
<property name="securityManager" ref="securityManager" /> | ||
</bean> | ||
<!--<bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">--> | ||
<!--<property name="securityManager" ref="securityManager"/>--> | ||
<!--</bean>--> | ||
|
||
<bean | ||
class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver"> | ||
<property name="exceptionMappings"> | ||
<props> | ||
<prop key="org.apache.shiro.authz.UnauthorizedException">error/403</prop> | ||
</props> | ||
</property> | ||
</bean> | ||
<!--<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">--> | ||
<!--<property name="exceptionMappings">--> | ||
<!--<props>--> | ||
<!--<prop key="org.apache.shiro.authz.UnauthorizedException">error/403</prop>--> | ||
<!--</props>--> | ||
<!--</property>--> | ||
<!--</bean>--> | ||
<!-- end --> | ||
|
||
<bean class="com.xqlc.core.spring.SpringApplicationContext"></bean> | ||
<!-- 用于获取Spring管理的Beans --> | ||
<bean class="com.darknight.core.web.spring.SpringApplicationContext"></bean> | ||
</beans> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.