我在 spring 和 freemarker 之间的集成问题

My problems in the integration between spring and freemarker

我哪里错了?当我开始 tomcat 时,一切正常,freemarker 工作正常,但在 spring-mvc.xml 中我收到错误[No setter found for 属性 'freemarkerSettings' 在 class:
'org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer']

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context-support</artifactId>
    <version>3.2.5.RELEASE</version>
</dependency>

<dependency>
    <groupId>org.freemarker</groupId>
    <artifactId>freemarker</artifactId>
    <version>2.3.23</version>
</dependency>

在我的 spring-mvc.xml

    <!-- Freemarker -->
<bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
    <property name="templateLoaderPath" value="/WEB-INF/view/" />
    <property name="freemarkerSettings">
        <props>
            <prop key="template_update_delay">10</prop>
            <prop key="defaultEncoding">UTF-8</prop>
            <prop key="url_escaping_charset">UTF-8</prop>
            <prop key="locale">zh_CN</prop>
            <prop key="boolean_format">true,false</prop>
            <prop key="time_format">HH:mm:ss</prop>
            <prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop>
            <prop key="date_format">yyyy-MM-dd</prop>
            <prop key="number_format">#.##</prop>
            <prop key="whitespace_stripping">true</prop>
        </props>
    </property>
    <property name="freemarkerVariables">
        <map>
            <entry key="resources" value="/site-war/resources" />
        </map>
    </property>
</bean>

似乎 "templateLoaderPath""freemarkerSettings" 'freemarkerVariables' 有错误 [No setter found for 属性 'freemarkerSettings' in class 'org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer']
怎么解决,哎呀,我的英文真的很差!

您需要包含 spring-context-support.jar。正如 this link 中提到的,org.springframework.ui.freemarker 和许多其他曾经驻留在 spring-context.jar 中的软件包已移至 spring-context-support.jar 在 3.2.0