对于spring-boot并不是很熟悉,所以比较摸黑。相对于以前的XML配置方式还是有一定区别。在本次即时通讯项目中我用的spring-boot版本是2.1.4.RELEASE。spring-boot2.0以下的版本不是这样配置的。
在application.yml文件中设置如下
spring:
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB
enabled: true
对于spring-boot并不是很熟悉,所以比较摸黑。相对于以前的XML配置方式还是有一定区别。在本次即时通讯项目中我用的spring-boot版本是2.1.4.RELEASE。spring-boot2.0以下的版本不是这样配置的。
在application.yml文件中设置如下
spring:
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB
enabled: true