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

128 lines
5.7 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="paramResolverByAction"
class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">
<property name="paramName" value="action"/>
</bean>
<bean id="paramResolverByAction2"
class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">
<property name="paramName" value="actionId"/>
</bean>
<!--<bean id="localeResolver"-->
<!--class="org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver">-->
<!--</bean>-->
<bean id="homeResolver" class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver">
<property name="mappings">
<props>
<prop key="try">tryEditor</prop>
<prop key="installCFG">installCFG</prop>
</props>
</property>
</bean>
<bean id="loginController" class="com.wisemapping.controller.LoginController">
<property name="methodNameResolver" ref="paramResolverByAction"/>
<property name="mindmapService" ref="mindmapService"/>
<property name="userService" ref="userService"/>
<property name="driver" value="${database.driver}"/>
</bean>
<bean id="userValidator" class="com.wisemapping.validator.UserValidator">
<property name="userService" ref="userService"/>
<property name="captchaService" ref="reCaptcha"/>
</bean>
<bean id="userController" class="com.wisemapping.controller.UserRegistrationController">
<property name="sessionForm" value="false"/>
<property name="commandName" value="user"/>
<property name="commandClass" value="com.wisemapping.view.UserBean"/>
<property name="validator" ref="userValidator"/>
<property name="formView" value="userRegistration"/>
<property name="successView" value="userRegistrationConfirmation"/>
<property name="userService" ref="userService"/>
<property name="emailConfirmEnabled" value="${registration.email.enabled}"/>
<property name="captchaEnabled" value="${registration.recaptcha.enabled}"/>
<property name="captchaService" ref="reCaptcha"/>
</bean>
<bean id="settingResolver" class="org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver">
<property name="mappings">
<props>
<prop key="settings">settings</prop>
</props>
</property>
</bean>
<bean id="settingsController" class="com.wisemapping.controller.SettingsController">
<property name="methodNameResolver" ref="settingResolver"/>
</bean>
<bean id="changePasswordValidator" class="com.wisemapping.validator.ChangePasswordValidator"/>
<bean id="changePasswordController" class="com.wisemapping.controller.ChangePasswordController">
<property name="sessionForm" value="false"/>
<property name="commandName" value="changePassword"/>
<property name="commandClass" value="com.wisemapping.view.ChangePasswordBean"/>
<property name="validator" ref="changePasswordValidator"/>
<property name="formView" value="changePassword"/>
<property name="successView" value="closeDialog"/>
<property name="userService" ref="userService"/>
</bean>
<bean id="editProfileValidator" class="com.wisemapping.validator.EditProfileValidator">
<property name="userService" ref="userService"/>
</bean>
<bean id="editProfileController" class="com.wisemapping.controller.EditProfileController">
<property name="sessionForm" value="false"/>
<property name="commandName" value="editProfile"/>
<property name="commandClass" value="com.wisemapping.view.UserBean"/>
<property name="validator" ref="editProfileValidator"/>
<property name="formView" value="editProfile"/>
<property name="successView" value="closeDialog"/>
<property name="userService" ref="userService"/>
</bean>
<bean id="historyController" class="com.wisemapping.controller.HistoryController">
<property name="methodNameResolver" ref="paramResolverByAction"/>
<property name="mindmapService" ref="mindmapService"/>
<property name="userService" ref="userService"/>
</bean>
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- one of the properties available; the maximum file size in bytes -->
<property name="maxUploadSize" value="522240"/>
</bean>
<bean id="activationController" class="com.wisemapping.controller.ActivationController">
<property name="userService" ref="userService"/>
</bean>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="interceptors">
<list>
<ref bean="browserSupportInterceptor"/>
<ref bean="localeChangeInterceptor"/>
</list>
</property>
<property name="mappings">
<props>
<!-- Forms based -->
<prop key="userRegistration">usersController</prop>
<prop key="login">loginController</prop>
<prop key="activation">activationController</prop>
<prop key="changePassword">changePasswordController</prop>
<prop key="settings">settingsController</prop>
<prop key="editProfile">editProfileController</prop>
<prop key="history">historyController</prop>
</props>
</property>
</bean>
2009-06-07 20:59:43 +02:00
</beans>