Failed to bind properties under ‘spring.servlet.multipart.file-size-threshold‘ to

 

Description:

Failed to bind properties under 'spring.servlet.multipart.file-size-threshold' to org.springframework.util.unit.DataSize:

    Property: spring.servlet.multipart.file-size-threshold
    Value: 20M
    Origin: class path resource [application.properties]:16:46
    Reason: failed to convert java.lang.String to org.springframework.util.unit.DataSize

Action:

Update your application's configuration

Disconnected from the target VM, address: '127.0.0.1:55242', transport: 'socket'

Process finished with exit code 1

Spring Boot 1.3 或之前的版本,配置:

  multipart.maxFileSize = 100Mb

      multipart.maxRequestSize=150Mb

Spring Boot 1.4 版本后配置更改为:

  spring.http.multipart.maxFileSize = 100Mb
  spring.http.multipart.maxRequestSize = 150Mb


Spring Boot 2.0 之后的版本配置修改为: 单位Mb改为MB了

spring.servlet.multipart.max-file-size = 100MB
spring.servlet.multipart.max-request-size = 150MB

 

你可能感兴趣的:(java,springboot,java,spring)