server/src/main/webapp/WEB-INF/spring-servlet.xml
author ymh <ymh.work@gmail.com>
Tue, 01 Jan 2013 09:28:03 +0100
changeset 50 7b517a54b708
parent 47 267d67791e05
child 51 3247fccfbd3f
permissions -rw-r--r--
Merge last changes from rv

<?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:p="http://www.springframework.org/schema/p"
    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.0.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context-3.0.xsd
                        http://www.springframework.org/schema/mvc
                        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

    <!-- **************************************************************** -->
    <!-- RESOURCE FOLDERS CONFIGURATION -->
    <!-- Dispatcher configuration for serving static resources -->
    <!-- **************************************************************** -->
    <mvc:resources location="/images/" mapping="/images/**" />
    <mvc:resources location="/css/" mapping="/css/**" />

    <!-- **************************************************************** -->
    <!-- SPRING ANNOTATION PROCESSING -->
    <!-- **************************************************************** -->
    <mvc:annotation-driven />
    <context:component-scan
        base-package="org.iri_research.renkan.controller" />
         
    <bean id="viewResolver"
        class="org.springframework.web.servlet.view.UrlBasedViewResolver">
        <property name="viewClass"
            value="org.springframework.web.servlet.view.JstlView" />
        <property name="prefix" value="/WEB-INF/jsp/" />
        <property name="suffix" value=".jsp" />
        <property name="order" value="2" />
    </bean>
    
    <bean id="templateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
        <property name="prefix" value="/WEB-INF/templates/" />
        <property name="suffix" value=".html" />
        <property name="templateMode" value="HTML5" />
        <property name="cacheable" value="false"/>
    </bean>
    
    <bean id="templateEngine" class="org.thymeleaf.spring3.SpringTemplateEngine">
        <property name="templateResolver" ref="templateResolver" />
    </bean>
    
    <bean class="org.thymeleaf.spring3.view.ThymeleafViewResolver">
        <property name="templateEngine" ref="templateEngine" />
        <property name="order" value="1" />
        <!--property name="viewNames" value="*.html,*.xhtml" /-->
        <property name="characterEncoding" value="UTF-8"/>
    </bean>
    
</beans>