freemarker集成到spring mvc的错误

将freemarker集成到spring mvc的错误,提示如下错误。

1. Build path is incomplete. Cannot find class file for org/springframework/ui/freemarker/
 FreeMarkerConfigurationFactory

2.No setter found for property 'templateLoaderPath' in class 
 'org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer' [config set: Warehouse/web-context]

原因:

需要依赖spring-context-support 库。 在pom.xml中添加如下内容即可。

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

 

此篇文章已被阅读2328 次

Add a Comment

邮箱地址不会被公开。 必填项已用*标注