烦恼 - 将 Mina 2.x 与 Spring 3.x 一起使用时发出警告
除了提高日志级别之外,有人知道摆脱此警告的好方法吗?请注意,服务器中的所有内容仍然按预期工作,但每次重新启动服务器时都会发生这种情况。
o.s.b.f.c.CustomEditorConfigurer - Passing PropertyEditor instances into CustomEditorConfigurer is deprecated: use PropertyEditorRegistrars or PropertyEditor class names instead. Offending key [java.net.SocketAddress; offending editor instance: org.apache.mina.integration.beans.InetSocketAddressEditor@314585
Red5 服务器使用 Apache Mina 2.0 和 Spring 3.0.4,但从 Spring 2.5 左右开始就出现了该警告。
Anyone know of a good way to get rid of this warning, besides increasing the log level? Mind you everything in the server still works as expected, but this occurs every time the server is restarted.
o.s.b.f.c.CustomEditorConfigurer - Passing PropertyEditor instances into CustomEditorConfigurer is deprecated: use PropertyEditorRegistrars or PropertyEditor class names instead. Offending key [java.net.SocketAddress; offending editor instance: org.apache.mina.integration.beans.InetSocketAddressEditor@314585
The Red5 server is using Apache Mina 2.0 and Spring 3.0.4, but the warning has been showing up since Spring 2.5 or so.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜您在 Spring XML 文件中可能有类似的内容:
正如警告所述,不推荐将
PropertyEditor
实例传递到CustomEditorConfigurer
中。不过,可以使用PropertyEditor
类名来代替。您可以在
CustomEditorConfigurer
的 Javadoc。您的情况的简单修复方法是使用类名作为映射条目值,而不是
InetSocketAddressEditor
实例:I'm guessing you probably have something like this in a Spring XML file:
As the warning says, passing
PropertyEditor
instances into aCustomEditorConfigurer
is deprecated. However it's OK to usePropertyEditor
class names instead.You can read more about this in the Javadoc for
CustomEditorConfigurer
.The simple fix in your case is to use a class name as the map entry value, instead of an
InetSocketAddressEditor
instance: