Springmvc开发常出现的4xx,5xx异常. 之前用Struts1/2几乎没见过这些异常. Springmvc是不是该改进下了???!!
Request URL: http://localhost:8080/test/xxx/addList
Request Method: POST
Status Code: 415 Unsupported Media Type
ajax发送请求,可能格式不对,可能要设:
contentType : "application/json",
Request URL: http://localhost:8080/test/xxx/addList
Request Method: POST
Status Code: 400 Bad Request
Remote Address: [::1]:8080
Referrer Policy: no-referrer-when-downgrade
400错误.参数类型不对,或有空值就会出这种错误.
MySql用Timestamp时,经常出现.
// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Timestamp datetime;
这个标签是springmvc的,只能解决空值报400问题.不能解决显示和编辑的情况.
304 Not Modified. 将springmvc maven工程改成war工程时,index.html访问出现304错误,页面没加载完. 但访问别的却可以(http://localhost:8080/test/xxx/xxx.html).