andrefilipeos
andrefilipeos

Reputation: 129

Spring threshold file size

In version 2.1.3, Failed to bind properties under 'spring.servlet.multipart.file-size-threshold' to org.springframework.util.unit.DataSize

Property:

spring.servlet.multipart.file-size-threshold=2KB

Exception:

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: 2KB 
Origin: class path resource [application.properties]:24:46
Reason: failed to convert java.lang.String to org.springframework.util.unit.DataSize

Action:

Update your application's configuration

Upvotes: 0

Views: 715

Answers (1)

Andy Wilkinson
Andy Wilkinson

Reputation: 116091

You have a trailing space in the property's value. You have configured a size of 2KB and it should be 2KB.

Upvotes: 1

Related Questions