微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Freemarker与Java 8的问题

我最近将我的项目更新为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就不需要反省它了.

原文地址:https://www.jb51.cc/spring/432346.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐