- 29
- 0
1.使用富文本编辑器上传图片,在controller中使用MultipartFile接收为null。debug发现,request经过dispatcherServlet是有值的。而且可以正常映射到方法中去。
2.springmvc中的配置:
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- 设定默认编码 -->
<property name="defaultEncoding" value="UTF-8"></property>
<!-- 设定文件上传的最大值5MB,5*1024*1024 -->
<property name="maxUploadSize" value="5242880"></property>
</bean>
3.DEBUG信息:
DEBUG [http-bio-90-exec-10] - DispatcherServlet with name 'web' processing GET request for [/js/kindeditor-4.1.10/lang/zh_CN.js]
DEBUG [http-bio-90-exec-10] - Looking up handler method for path /js/kindeditor-4.1.10/lang/zh_CN.js
DEBUG [http-bio-90-exec-10] - Did not find handler method for [/js/kindeditor-4.1.10/lang/zh_CN.js]
DEBUG [http-bio-90-exec-10] - Matching patterns for request [/js/kindeditor-4.1.10/lang/zh_CN.js] are [/js/**]
DEBUG [http-bio-90-exec-10] - URI Template variables for request [/js/kindeditor-4.1.10/lang/zh_CN.js] are {}
DEBUG [http-bio-90-exec-10] - Mapping [/js/kindeditor-4.1.10/lang/zh_CN.js] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/js/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@105fda6b]]] and 1 interceptor
DEBUG [http-bio-90-exec-10] - Last-Modified value for [/js/kindeditor-4.1.10/lang/zh_CN.js] is: -1
DEBUG [http-bio-90-exec-10] - Null ModelAndView returned to DispatcherServlet with name 'web': assuming HandlerAdapter completed request handling
DEBUG [http-bio-90-exec-10] - Successfully completed request
DEBUG [http-bio-90-exec-10] - DispatcherServlet with name 'web' processing GET request for [/js/kindeditor-4.1.10/plugins/multiimage/images/swfupload.swf]
DEBUG [http-bio-90-exec-10] - Looking up handler method for path /js/kindeditor-4.1.10/plugins/multiimage/images/swfupload.swf
DEBUG [http-bio-90-exec-10] - Did not find handler method for [/js/kindeditor-4.1.10/plugins/multiimage/images/swfupload.swf]
DEBUG [http-bio-90-exec-10] - Matching patterns for request [/js/kindeditor-4.1.10/plugins/multiimage/images/swfupload.swf] are [/js/**]
DEBUG [http-bio-90-exec-10] - URI Template variables for request [/js/kindeditor-4.1.10/plugins/multiimage/images/swfupload.swf] are {}
DEBUG [http-bio-90-exec-10] - Mapping [/js/kindeditor-4.1.10/plugins/multiimage/images/swfupload.swf] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/js/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@105fda6b]]] and 1 interceptor
DEBUG [http-bio-90-exec-10] - Last-Modified value for [/js/kindeditor-4.1.10/plugins/multiimage/images/swfupload.swf] is: -1
DEBUG [http-bio-90-exec-10] - Null ModelAndView returned to DispatcherServlet with name 'web': assuming HandlerAdapter completed request handling
DEBUG [http-bio-90-exec-10] - Successfully completed request
DEBUG [http-bio-90-exec-10] - DispatcherServlet with name 'web' processing POST request for [/pic/upload]
DEBUG [http-bio-90-exec-10] - Found multipart file [uploadFile] of size 345594 bytes with original filename [natalie.png], stored at [D:ideaWorkspace2e3mallwebtargettomcatworkTomcatlocalhost_upload_605390ea_b9db_44ee_9bf4_b426b27db686_00000001.tmp]
DEBUG [http-bio-90-exec-10] - Looking up handler method for path /pic/upload
DEBUG [http-bio-90-exec-10] - Returning handler method [public java.util.Map cn.e3mall.controller.PictureController.fileUpload(org.springframework.web.multipart.MultipartFile)]
DEBUG [http-bio-90-exec-10] - Returning cached instance of singleton bean 'pictureController'
DEBUG [http-bio-90-exec-10] - Skip CORS processing, request is a same-origin one
- 扫一扫访问手机版
回答动态

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器更新之后。服务器里面有部分玩家要重新创建角色是怎么回事啊?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题函数计算不同地域的是不能用内网吧?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题ARMS可以创建多个应用嘛?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题在ARMS如何申请加入公测呀?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题前端小程序接入这个arms具体是如何接入监控的,这个init方法在哪里进行添加?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器刚到期,是不是就不能再导出存档了呢?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器的游戏版本不兼容 尝试更新怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器服务器升级以后 就链接不上了,怎么办?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器转移以后服务器进不去了,怎么解决?预计能赚取 0积分收益

- 神奇的四哥:发布了悬赏问题阿里云幻兽帕鲁服务器修改参数后游戏进入不了,是什么情况?预计能赚取 0积分收益
- 回到顶部
- 回到顶部

