@ConfigurationProperties(prefix = "foo")
@Data
public class DemoConfig {
private long timeout;
private int count;
private String other;
}
foo:
timeout: ${60*1000}
count: 10
other: ${'hello '+'world'}
expect timeou = 60000 and other="hello world". but it failed to start up Reason: failed to convert java.lang.String to long (caused by java.lang.NumberFormatException: For input string: "${60*1000}")
Comment From: quaff
${...}
is placeholder not SpEL.
Comment From: snicoll
ConfigurationProperties
is a Spring Boot concept but I confirm we have no intention of supporting spel there. See https://github.com/spring-projects/spring-boot/issues/1768