我们在ASP.net中使用URL导向后, 我们在访问某个地址,或者打开某个系统页面的时候,就会报错误: A potentially dangerous Request.Path value was detected from the client at System.Web.HttpRequest.ValidateInputIfRequiredByConfig() at System.Web.HttpApplication.ValidateRequestExecutionStep.System.
背景 今天在自己使用Springboot开发博客系统的时候,在浏览器点击提交markdown文件一直出现以下异常: java.lang.IllegalArgumentException: Request header is too large 使用的WEB技术栈是Springboot,内嵌tomcat服务启动 解决方案 经过排查,是因为服务器有请求长度配置,查看服务器配置类ServerProperties源码可以看到,有以下参数: /** * Maximum size, in bytes, of
异常与HTTP状态码的映射(@ResponseStatus) Spring默认会将自身抛出的异常自动映射到合适的状态码,如下是一些示例: 举个例子,当后端抛出如下异常(TypeMismatchException异常,往方法传参时,类型不匹配): org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'long'; ne