This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb6/legacyworlds-web/legacyworlds-web-main/WebContent/WEB-INF/main-servlet.xml

78 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"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:annotation-config />
<context:component-scan base-package="com.deepclone.lw.web.main" />
<!-- FreeMarker templating library -->
<bean id="freemarkerConfig"
class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<property name="templateLoaderPath" value="/WEB-INF/fm/" />
<property name="freemarkerVariables">
<map>
<entry key="xml_escape" value-ref="fmXmlEscape" />
</map>
</property>
<property name="freemarkerSettings">
<props>
<prop key="default_encoding">UTF-8</prop>
</props>
</property>
</bean>
<bean id="fmXmlEscape" class="freemarker.template.utility.XmlEscape" />
<!-- Session service connector -->
<bean id="sessionSrv" class="org.springframework.remoting.rmi.RmiProxyFactoryBean"
scope="prototype">
<property name="serviceInterface" value="com.deepclone.lw.session.SessionAccessor" />
<property name="serviceUrl" value="rmi://localhost:9137/sessionSrv" />
</bean>
<!-- General web beans -->
<bean id="sessionClient" class="com.deepclone.lw.web.beans.session.SessionClientBean"
scope="singleton" />
<bean id="xhtmlOnIE"
class="com.deepclone.lw.web.beans.intercept.IEContentTypeBean"
scope="singleton" />
<bean id="sessionInterceptor"
class="com.deepclone.lw.web.beans.intercept.SessionInterceptorBean"
scope="singleton" />
<bean id="languageInterceptor"
class="com.deepclone.lw.web.beans.intercept.LanguageInterceptorBean"
scope="singleton" />
<bean id="messageFormatter"
class="com.deepclone.lw.web.beans.msgs.MessageFormatterBean"
scope="singleton" />
<bean id="maintenanceStatus"
class="com.deepclone.lw.web.beans.session.MaintenanceStatusBean"
scope="singleton" />
<!-- Interceptors -->
<bean id="annotationMapper"
class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
<property name="interceptors">
<list>
<ref bean="languageInterceptor" />
<ref bean="sessionInterceptor" />
<ref bean="xhtmlOnIE" />
</list>
</property>
</bean>
<!-- Error handler -->
<bean id="errorHandler" class="com.deepclone.lw.web.main.ErrorHandlerBean" />
<!-- View resolver -->
<bean id="viewResolver"
class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">
<property name="cache" value="true" />
<property name="prefix" value="" />
<property name="suffix" value=".ftl" />
<property name="contentType" value="application/xhtml+xml;charset=UTF-8" />
</bean>
</beans>