mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2025-03-15 01:31:41 +01:00
71 lines
2.9 KiB
XML
71 lines
2.9 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.xsd
|
|
http://www.springframework.org/schema/context
|
|
http://www.springframework.org/schema/context/spring-context.xsd
|
|
http://www.springframework.org/schema/mvc
|
|
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
|
|
|
<context:component-scan base-package="com.wisemapping.webmvc"/>
|
|
<context:annotation-config/>
|
|
<mvc:annotation-driven/>
|
|
<context:property-placeholder location="/WEB-INF/app.properties" ignore-unresolvable="true"/>
|
|
|
|
<!-- Interceptors Registration -->
|
|
<mvc:interceptors>
|
|
<bean id="userLocaleInterceptor" class="com.wisemapping.filter.UserLocaleInterceptor"/>
|
|
<bean id="requestInterceptor" class="com.wisemapping.filter.RequestPropertiesInterceptor"/>
|
|
</mvc:interceptors>
|
|
|
|
<bean id="simpleMappingExceptionResolver"
|
|
class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
|
|
<property name="defaultStatusCode" value="500"/>
|
|
<property name="defaultErrorView" value="unexpectedError"/>
|
|
<property name="warnLogCategory" value="com.wisemapping.mvc.Exceptions"/>
|
|
|
|
<property name="exceptionMappings">
|
|
<props>
|
|
<!-- Security access exceptions must not handled as unexpected errors -->
|
|
<prop key="com.wisemapping.exceptions.MapNonPublicException">securityError</prop>
|
|
<prop key="com.wisemapping.exceptions.AccessDeniedSecurityException">securityError</prop>
|
|
</props>
|
|
</property>
|
|
|
|
<property name="statusCodes">
|
|
<props>
|
|
<prop key="securityError">403</prop>
|
|
</props>
|
|
</property>
|
|
</bean>
|
|
|
|
<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
|
|
<property name="viewClass" value="org.springframework.web.servlet.view.tiles3.TilesView"/>
|
|
</bean>
|
|
|
|
<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
|
|
<property name="definitions">
|
|
<list>
|
|
<value>/WEB-INF/defs/definitions.xml</value>
|
|
</list>
|
|
</property>
|
|
</bean>
|
|
|
|
<bean id="localeResolver"
|
|
class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
|
|
</bean>
|
|
|
|
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
|
|
<property name="defaultEncoding" value="UTF-8"/>
|
|
<property name="basenames">
|
|
<list>
|
|
<value>messages</value>
|
|
</list>
|
|
</property>
|
|
</bean>
|
|
</beans>
|