springboot中出现异常IllegalArgumentException: Invalid character found in the request target [/system/getImage?path=F:\worker\images\55540025-79f2-4c10-8272-a845b04d2ba5]. The valid characters are defined in RFC 7230 and RFC 3986
可能原因:
产生这个问题的原因是页面表单提交了大量的数据,而这些数据量可能超过了Tomcat 定义的Header头内容。
解决办法:
配置文件中加入如下:
server:
port: 8080
spring:
application:
name: micro-system
thymeleaf:
cache: false
servlet:
multipart:
max-file-size: 50MB
max-request-size: 60MB
eureka:
client:
service-url:
defaultZone: http://localhost:20000/eureka
max-file-size: 50MB #设置单个文件的最大为
max-request-size#设置总上传的数据大小