freemarker集成到spring mvc的错误
Posted On 2015年5月27日
将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 次