`
Donald_Draper
  • 浏览: 950944 次
社区版块
存档分类
最新评论

405 request method post not supported

阅读更多
1.检查链接地址有没有错误
2.看RequestMethod,是GET,还是POST
Controller
@RequestMapping("/test")
public class TestController extends BaseController {
private static Logger log = LoggerFactory.getLogger(TestController.class);
@ResponseBody
@RequestMapping(value = "/1", method = RequestMethod.POST)
public String test(){
return "test";
}
3.如果仍没有解决
看web.xml配置:
<servlet-name>SpringMVC</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:config/spring-mvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>SpringMVC</servlet-name>
<url-pattern>/inline/*</url-pattern>
</servlet-mapping>
在访问web的根目录下加/inline
post http:localhost:8080/web/inline/test/1

0
1
分享到:
评论

相关推荐

    http请求405错误方法不被允许的解决 (Method not allowed)

    主要介绍了http请求405错误方法不被允许的解决 (Method not allowed),文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

    jsp中kindeditor的用和遇到的问题总结附上项目配置

    jsp中kindeditor的用和遇到的问题总结附上项目配置。综合别人的再加上自己做的。并含有一个简单的测试工程和kindeditor的压缩包

    Senfore_DragDrop_v4.1

    Earlier versions of Delphi and C++ Builder will not be supported. If you need Delphi 3 or C++ Builder 3 support you will have to revert to version 3.7 of the Drag and Drop Component Suite. The ...

    servlet2.4doc

    Called by the server (via the service method) to allow a servlet to handle a POST request. doPut(HttpServletRequest, HttpServletResponse) - Method in class javax.servlet.http.HttpServlet Called by ...

    tomcat解决跨域访问问题配置

    &lt;param-value&gt;token,Access-Control-Allow-Origin,Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers --&gt; &lt;param-value&gt;Access-Control-Allow-Origin,...

    JSP Simple Examples

    Whenever an http client sends a request, it sends the request in the form of get or post method or any other HttpRequest methhods. It can also sends the headers with it. Specific request headers in ...

    HTTP协议详解

    10.4.6 405 不被允许的方法(Method Not Allowed) 10.4.7 406 不接受的 (Not Acceptable) 10.4.8 407 代理服务器授权所需(Proxy Authentication Required) 10.4.9 408 请求超时(Request Timeout) 10.4.10 409...

    8-07-14_MegaCLI for linux_windows

    SCGCQ00318648 Defect VD creation on regular drives fails for older firmware where 4K sector is not supported SCGCQ00319423 Defect FreeBSD MegaCLI v8.05.02 does not detect controller when driver 5.504....

    Http1.1超文本传输协议中文版

    10.4.6 405 不被允许的方法(Method Not Allowed) 65 10.4.7 406 不接受的 (Not Acceptable) 65 10.4.8 407 代理服务器授权所需(Proxy Authentication Required) 65 10.4.9 408 请求超时(Request Timeout) 65...

    asp.net mvc

    This is a Release Candidate (RC) release and is not officially supported. If you have questions about working with this release, post them to the ASP.NET MVC forum (http://forums.asp.net/1146.aspx), ...

    微信小程序 HTTPS报错整理常见问题及解决方案

    主要介绍了微信小程序 HTTPS报错常见问题及解决方案的相关资料,需要的朋友可以参考下

    restful restful所需要的jar包

    * Tunneling service lets browsers issue any HTTP method (PUT, DELETE, MOVE, etc.) through a simple HTTP POST. This service is transparent for Restlet applications. Complete Web Server * Static file...

    php.ini-development

    documents, however this remains supported for backward compatibility reasons. ; Note that this directive does not control the , which can be ; used regardless of this directive. ; Default Value: On ;...

    google api php client

    These client libraries are officially supported by Google. However, the libraries are considered complete and are in maintenance mode. This means that we will address critical bugs and security issues...

    BURNINTEST--硬件检测工具

    Windows 98 and ME are not supported in BurnInTest version 5.3 and above. Use a version of BurnInTest prior to 5.2 for compatibility with W98 and ME. Windows 95 and Windows NT =======================...

    eac3to V3.17

    * fixed: all non-supported MKV tracks shared the same description * fixed: incorrect framerate mismatch complaint was shown for pulldown sources * fixed: FLAC tracks in MKV files don't slow down ...

    Clever Internet Suite (SRC) v9.1.0.0

    Clever Internet Suite version 9.1...IMAP client - the AppendMessage method did not work with GMail IMAP - fixed. FTP client - the file names with international symbols were obtained incorrectly - fixed. ...

    Delphi7.1 Update

    the blobsize of that field does not change if it is less than before (Quality Central 4676).* Calling the TClientDataset.Locate method on a TWordField always returns false (Quality Central 5319).* ...

    java-servlet-api.doc

    Java Servlet API说明文档 绪言 ... 谁需要读这份文档 这份文档描述了JavaServletAPI的最新版本2.1版。所以,这本书对于Servlet的开发者及servlet引擎的开发者同样适用。 JavaServletAPI的组成 ...这两个软件包的同时...

    ZendFramework中文文档

    1. Introduction to Zend Framework 1.1. 概述 1.2. 安装 2. Zend_Acl 2.1. 简介 2.1.1. 关于资源(Resource) 2.1.2. 关于角色(Role) 2.1.3. 创建访问控制列表(ACL) ...2.1.5. 定义访问控制 ...

Global site tag (gtag.js) - Google Analytics