消失的COS
Posted on December 15, 2007 - Filed Under Uncategorized |
一直在用COS作为上传组件
最近升级其中一个应用到Spring 2.5
竟然报错,找不到org.springframework.web.multipart.cos.CosMultipartResolver类
Spring 2.5把web和webmvc独立出来已经觉得有点奇怪得了
重新检查了一下,在spring-web里面找到
> org.springframework.web.multipart.commons
但是找不到
> org.springframework.web.multipart.cos
立刻查看2.5的reference,里面还在提及怎么使用COS
对比查看2.0和2.5的MultipartResolver的javadoc
在2.5发现这样一句
> There is only one concrete implementation included in Spring, as of Spring 2.5:
> org.springframework.web.multipart.commons.CommonsMultipartResolver for Jakarta Commons FileUpload
COS支持的确被去掉了,晕
一直一来,许多人的观点都是认为commons-fileupload是有内存泄露的,用COS比较保险
为了确认一下被去掉的原因,到spring forum里面search了一番,没有提及到这次的修改
在spring的changelog里面search了一番,终于找到说明的地方
> Changes in version 2.1 M1 (2007-05-13)
> removed CosMultipartResolver (as part of generally removing COS support from the Spring codebase)
但是没有说原因
晕了
看来只能试试用commons-fileupload
Most Commented Posts
Comments
Leave a Reply