加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

关于SpringMVC整合freemarker报错问题

发布时间:2020-12-15 07:11:48 所属栏目:Java 来源:网络整理
导读:错误信息: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FreeMarkerConfigurer' defined in class path resource [spring-mvc.xml]: Invocation of init method failed; nested exception is java.lang.NoSuch

错误信息:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FreeMarkerConfigurer' defined in class path resource [spring-mvc.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: freemarker.template.Configuration.<init>(Lfreemarker/template/Version;)V

报错原因:freemarker版本问题

通常情况下将其换为2.3.23

如下所示:

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

?

即可解决该问题

?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读