问题描述
在此行找到多个注释: -找不到类'org.springframework.ui.velocity.VelocityEngineFactoryBean' -找不到类'org.springframework.ui.velocity.VelocityEngineFactoryBean'[配置集:MyApp/web- 上下文]
Multiple annotations found at this line: - Class 'org.springframework.ui.velocity.VelocityEngineFactoryBean' not found - Class 'org.springframework.ui.velocity.VelocityEngineFactoryBean' not found [config set: MyApp/web- context]
<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
<property name="velocityProperties">
<value>
resource.loader=class
class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
</value>
</property>
</bean>
推荐答案
Spring已将Velocity软件包 org.springframework.ui.velocity 标记为已在 Spring 4.3 中弃用并删除它完全在 Spring 5.0.1 中发布(根据JürgenHöller的说法,这是因为Velocity Framework 可追溯到2010年" ).
来源: https://jira.spring.io/browse/SPR-13795 .
Spring has marked Velocity package org.springframework.ui.velocity as deprecated in Spring 4.3 and removed it completely in Spring 5.0.1 (according to Jürgen Höller, it's because Velocity Framework "dates back to 2010").
Source: https://jira.spring.io/browse/SPR-13795.
但是,您仍然可以在Spring 5.0.x Framework中使用Velocity 1.7.
只需在线程.
However, you can still use Velocity 1.7 in Spring 5.0.x Framework.
Just follow the answer of @bekce in this thread.
这篇关于Spring5.0.1 VelocityEngineFactoryBean的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!