上傳顯示405,不支持post?
29148 [http-nio-8080-exec-2] DEBUG org.springframework.web.servlet.DispatcherServlet ?- Successfully completed request
57836 [http-nio-8080-exec-5] DEBUG org.springframework.web.servlet.DispatcherServlet ?- DispatcherServlet with name 'mvc-dispatcher' processing POST request for [/spring-mvc-study0605/courses/upload]
57836 [http-nio-8080-exec-5] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping ?- Looking up handler method for path /courses/upload
57844 [http-nio-8080-exec-5] DEBUG org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver ?- Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported
57844 [http-nio-8080-exec-5] DEBUG org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver ?- Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported
57844 [http-nio-8080-exec-5] DEBUG org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver ?- Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported
57844 [http-nio-8080-exec-5] WARN ?org.springframework.web.servlet.PageNotFound ?- Request method 'POST' not supported
2017-06-22
注意下,課程的文件里,file沒有指明路徑,我估計(jì)很多人會(huì)遇到這個(gè)404錯(cuò)誤
2017-06-22
這個(gè)問題搞定了,加上common-io依賴以后,問題變成了500,然后加了上傳配置后就成功了。