[Solved] 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 or earlier, configure :
multipart.maxFileSize = 100Mb
multipart.maxRequestSize=150Mb
After Spring Boot version 1.4 the configuration was changed to :
spring.http.multipart.maxFileSize = 100Mb
spring.http.multipart.maxRequestSize = 150Mb

The configuration of Spring Boot 2.0 onwards has been changed: the unit Mb has been changed to MB
spring.servlet.multipart.max-file-size = 100MB
spring.servlet.multipart.max-request-size = 150MB

Read More: