ssm整合-错误3

1、警告: Unknown version string [3.1]. Default version will be used.

因为Tomcat版本为7,支持3.1版本的为Tomcat 8;

2、Required Integer parameter 'id' is not present

在controller的方法中接收参数需要使用注解 @PathVariable

3、在RESTful约束下,对于页面的post请求没有转化成deleteMapping请求

1 警告: No mapping found for HTTP request with URI [/management/fonts/glyphicons-halflings-regular.woff] in DispatcherServlet with name 'dispatcherServlet'
2 5月 25, 2018 11:17:16 下午 org.springframework.web.servlet.PageNotFound noHandlerFound
3 警告: No mapping found for HTTP request with URI [/management/fonts/glyphicons-halflings-regular.ttf] in DispatcherServlet with name 'dispatcherServlet'
4 5月 25, 2018 11:17:18 下午 org.springframework.web.servlet.PageNotFound handleHttpRequestMethodNotSupported
5 警告: Request method 'POST' not supported

原因是web页面无法接收delete请求,如果需要接收delete请求,则需要在form表单提交时添加隐藏条件

1 <input type="hidden" name="_method" value="DELETE"/>

如果请求的方法一样,但是还是同样报这样的错误,应该就是请求的地址出了问题,需要检查地址信息是否出错

猜你喜欢

转载自www.cnblogs.com/thyHome/p/9091343.html