SpringBoot @Value 设置默认值,解决key不存在造成启动报错 (SpEL 表达式)
@Value("${report.background.image:}")
private String imageFilePath;
默认值是空
@Value("${report.background.image:aaa}")
private String imageFilePath;
默认值是aaa
@Value("${report.background.image:}")
private String imageFilePath;
默认值是空
@Value("${report.background.image:aaa}")
private String imageFilePath;
默认值是aaa