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

Freemarker与Java 8的问题

发布时间:2020-12-15 01:31:46 所属栏目:大数据 来源:网络整理
导读:我最近将我的项目更新为Java 8,在尝试让我的项目再次工作时我遇到了一些问题.现在,问题看起来像Java 8 Introspection API与我的freemarker配置有冲突,每次我尝试运行服务器时都会收到此错误. Failed to obtain BeanInfo for class [freemarker.template.Conf

我最近将我的项目更新为Java 8,在尝试让我的项目再次工作时我遇到了一些问题.现在,问题看起来像Java 8 Introspection API与我的freemarker配置有冲突,每次我尝试运行服务器时都会收到此错误.

Failed to obtain BeanInfo for class [freemarker.template.Configuration]; nested exception is java.beans.IntrospectionException: type mismatch between read and write methods

我的freemarker版本是

    

我的Spring版本是3.2.5,我没有升级到版本4.x,在那里我读到了类似的问题.
有什么建议吗?

这里是stactrace

java.beans.IntrospectionException: type mismatch between read and write methods
at org.springframework.beans.PropertyDescriptorUtils.findPropertyType(ExtendedBeanInfo.java:512)
at org.springframework.beans.SimplePropertyDescriptor.

此票也与https://jira.spring.io/browse/SPR-12448相关
但就像我说的那样,Spring 4.2的更新现在不是一个选择.

问候.

最佳答案
我想你正在将freemarker.template.Configuration添加到你的应用程序上下文中.也许你可以将它包装在另一个类中,因此在应用程序上下文中没有freemarker.template.Configuration的实例.那样Spring就不需要反省它了.

(编辑:李大同)

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

    推荐文章
      热点阅读