wisemapping-open-source/wise-webapp/src/main/webapp/WEB-INF/wisemapping-nservlet.xml

90 lines
3.7 KiB
XML
Raw Normal View History

<?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-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
<context:component-scan base-package="com.wisemapping.ncontroller"/>
<context:annotation-config/>
<mvc:annotation-driven/>
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="/WEB-INF/app.properties"/>
</bean>
<bean id="exceptionHandlerResolver"
class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
<property name="defaultStatusCode" value="500"/>
<property name="defaultErrorView" value="unexpectedError"/>
<property name="exceptionMappings">
<props>
<prop key="com.wisemapping.exceptions.UnsupportedBrowserException">browserNotSupported</prop>
<!-- Security exceptions are wrapped in this exceptions -->
<prop key="java.lang.reflect.UndeclaredThrowableException">securityError</prop>
</props>
</property>
</bean>
<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/>
</bean>
<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.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">
<property name="defaultLocale" value="en"/>
</bean>
<bean id="localeChangeInterceptor"
class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<property name="paramName" value="language"/>
</bean>
<bean id="reCaptcha" class="net.tanesha.recaptcha.ReCaptchaImpl">
<property name="privateKey" value="${registration.recaptcha.privateKey}"/>
<property name="publicKey" value="${registration.recaptcha.publicKey}"/>
<property name="includeNoscript" value="false"/>
</bean>
<bean id="browserSupportInterceptor" class="com.wisemapping.filter.BrowserSupportInterceptor">
<property name="exclude">
<list>
<value>/</value>
<value>/index.jsp</value>
<value>/c/home</value>
<value>/c/login</value>
<value>/c/userRegistration</value>
<value>/c/captcha</value>
<value>/c/publicView</value>
<value>/service/*</value>
<value>/c/search</value>
<value>/c/keyboard</value>
<value>/c/renameMap</value>
<value>/c/embeddedView</value>
<value>/c/user/resetPassword</value>
</list>
</property>
</bean>
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>messages</value>
</list>
</property>
</bean>
</beans>