72 lines
2.6 KiB
XML
72 lines
2.6 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.admin" />
|
||
|
|
||
|
<!-- 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="messageFormatter"
|
||
|
class="com.deepclone.lw.web.beans.msgs.MessageFormatterBean"
|
||
|
scope="singleton" />
|
||
|
|
||
|
<!-- Interceptors -->
|
||
|
<bean id="annotationMapper"
|
||
|
class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
|
||
|
<property name="interceptors">
|
||
|
<list>
|
||
|
<ref bean="sessionInterceptor" />
|
||
|
<ref bean="xhtmlOnIE" />
|
||
|
</list>
|
||
|
</property>
|
||
|
</bean>
|
||
|
|
||
|
<!-- Error handler -->
|
||
|
<bean id="errorHandler" class="com.deepclone.lw.web.admin.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>
|